HTTP POST turns into GET

lucas-carvajal
TRIAL

2 years 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-carvajal
TRIAL

2 years 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! :)


2 years ago

please make sure you are calling your railway app with https


lucas-carvajal
TRIAL

2 years ago

that did the trick, thanks!


2 years ago

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


bgagandeep
FREE

9 months ago

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


9 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.


synthixai
HOBBY

4 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

4 months ago

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


HTTP POST turns into GET - Railway Help Station