HTTP POST turns into GET

lucas-carvajalTRIAL

a year ago

Hey everyone. A bit of a beginner question but I'm hosting a backend that also accepts POST requests. However when I send a POST request to the service, I get a 404 error. This is because in the logs of the application, I can see that actually a GET request was performed which resulted in the error.
Is there anything in Railway's API Gateway or proxy that I changes the HTTP method and that I can configure or fix?

Solved

8 Replies

lucas-carvajalTRIAL

a year ago

I tried it out locally and it works, but when I change the localhost domain to the railway domain in Postman, I get the error, so there shouldn't be something wrong with either me sending the request nor the backend, but seems like something with railway is misconfigured.
Any help is greatly appreciated! :)


a year ago

please make sure you are calling your railway app with https


lucas-carvajalTRIAL

a year ago

that did the trick, thanks!


a year ago

Yup this can happen if you do requests against http and they get rewritten to https (as we only support https)


bgagandeepTRIAL

8 months ago

Sorry to bring this old thread to life but even with https configuration is not working.


8 months ago

Please read the docs page - https://docs.railway.app/guides/fixing-common-errors#post-requests-turn-into-get-requests

But if you are 110% confident you are using https:// then please open a new thread as it would be a separate issue.


synthixaiHOBBY

2 months ago

sorry as well, but both of these do not work. not the https:// or anything else. please help please


synthixai

sorry as well, but both of these do not work. not the https:// or anything else. please help please

2 months ago

Hello, This thread does not pertain to your issue, I have answered you in your thread.