POST to railway service are being received as GET
ohabash
FREEOP

a year ago

I recently deployed my Node.js API to Railway, and I’m running into a strange issue—whenever I send a POST request, it’s being received as a GET on the server. I’ve double-checked my routes and middleware in Express, and everything works fine locally.

I also tested using curl like this:

curl -X POST https://myapp.up.railway.app/api/endpoint -H "Content-Type: application/json" -d '{"test":"data"}'

then i went to my service in the railway dash. under "HTTP Logs" i can see that post show up there as GET

Solved$10 Bounty

Pinned Solution

phoenixauro
HOBBY

a year ago

Run

curl -v -X POST https://youapp.up.railway.app/api/pulse/events -H "Content-Type: application/json" -d '{"test":"data"}'

See if there is 301 redirect happening.

Remember to replace yourapp in the command.

Also when pasting screenshots remember to blur your public url.

8 Replies

a year ago

Heya, can you link the project/service please ?


Status changed to Awaiting User Response Railway about 1 year ago


nico

Heya, can you link the project/service please ?

ohabash
FREEOP

a year ago


Status changed to Awaiting Railway Response Railway about 1 year ago


a year ago

that domain points to a service that is not deployed yet 🤔


Status changed to Awaiting User Response Railway about 1 year ago


nico

that domain points to a service that is not deployed yet 🤔

ohabash
FREEOP

a year ago

Well im new to Railway so maybe something simple. However I am receiving my requests as GET so does that mean its something else?


Status changed to Awaiting Railway Response Railway about 1 year ago


nico

that domain points to a service that is not deployed yet 🤔

ohabash
FREEOP

a year ago

here is a better look

Attachments


a year ago

Heya, unfortunately I'm unable to reproduce this.


Status changed to Awaiting User Response Railway about 1 year ago


nico

Heya, unfortunately I'm unable to reproduce this.

ohabash
FREEOP

a year ago

hmm. what are next steps?


phoenixauro
HOBBY

a year ago

Run

curl -v -X POST https://youapp.up.railway.app/api/pulse/events -H "Content-Type: application/json" -d '{"test":"data"}'

See if there is 301 redirect happening.

Remember to replace yourapp in the command.

Also when pasting screenshots remember to blur your public url.


Status changed to Solved chandrika 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...