Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:02:50+00:00 2026-05-27T07:02:50+00:00

I am developing a node.js app using express. I’m listening on port 3000 of

  • 0

I am developing a node.js app using express. I’m listening on port 3000 of localhost for POST requests. The only way I know how to simulate a POST request is using jQuery.ajax():

$.ajax({
    url: 'localhost:3000',
    type: 'POST',
    data: {hello: 1},
    success: function (data) {
        console.log(data);
    },
    error: function (data) {
        console.log(data);
    }
});

Unfortunately, I get a the error message:

“XMLHttpRequest cannot load localhost:3000. Cross origin requests are only supported for HTTP.”

What am I doing stupidly? Is there a better approach I should consider?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:02:51+00:00Added an answer on May 27, 2026 at 7:02 am

    You can also use unix command curl to simulate the requests. With it you get horde of options.

    In your case it would be curl http://localhost:3000 -d "{hello:1}" -X POST

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an application using node.js + express which contains a structure allowing the
I'm developing a node.js app. What I'm trying to do is get the getBody()
Is there a recommended way of developing a node module if I want to
I'm developing a websockter server using node.js and I've discovered some quirks in Chrome.
I am developing a webscoket server using node.js, and as I'm finishing up my
I am developing an app in node.js socke.io redis mysql , so this error
I am currently developing a chat system using Node.js. My question is, how do
Been playing around with node.js and I am developing a file uploading web app
I'm currently developing an API using NodeJS and Express. var express = require('express'); var
I am developing an IPhone app. The user can post to his wall and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.