Cannot use other HTTP verbs than GET

Service ID: 477e340b-e1f6-4da7-8ae2-2eeb32de06ee Hello, i'm having trouble using HTTP verbs other than the GET method when trying to access another endpoint than GET in my front-end or on postman, like the "/autenticar" This error only occurs when I try to execute a method other than GET, such as the "/cidades" endpoint, a GET listing method, but if I call it again passing the POST verb, the response is as if I did in GET, even not having the "POST /cidades"
8 Replies
Percy
Percy2y ago
Project ID: 477e340b-e1f6-4da7-8ae2-2eeb32de06ee
Brody
Brody2y ago
you need to be using the https scheme when accessing your railway app
rando
rando2y ago
^ and make sure you have a POST handler on that route. 404 usually means you're not handling POST requests for the route (the technically correct status code is 405, but frameworks are weird)
PatuRoco
PatuRocoOP2y ago
But the point is... i already deployed this API... but when i make it the first time, this exactly same POST route worked cryingman for the reason the project is private, i can't show much of the API, but root index.js is something like that, i don't know if that will help... The API is made using Node.Js with Express
Brody
Brody2y ago
use https before you try anything else
rando
rando2y ago
does the POST request work locally?
PatuRoco
PatuRocoOP2y ago
Yes
Brody
Brody2y ago
use https when accessing your app through the railway domain, problem solved locking thread now
Want results from more Discord servers?
Add your server