I’m building a new API server using Lucee, and I just noticed that all of
my requests are coming in as GET. I’m using Postman for testing, and when
I do a POST the result via both CGI.request_method and
getHttpRequestData().method are both displaying GET.
One cause that springs to mind that would produce this behaviour is some
kind of redirect (rather than rewrite) rules going on. If there are URL
redirects going on somewhere in the stack, the redirected URL will always
be a GET. e.g. if you had a redirect rule in apache to change URLs not
ending in a slash to ending in a slash, you’d get this:
POST /some/url → Apache response: redirect to /some/url/
GET /some/url/ → Lucee receives this when expecting POST
Check the network tab in your browser, you’ll be able to see this behaviour
if that is the case.
(I’ve not seen this behaviour in any other scenario personally).On 27 January 2017 at 14:26, Jason Graves <@Jason_Graves> wrote:
I’m building a new API server using Lucee, and I just noticed that all of
my requests are coming in as GET. I’m using Postman for testing, and when
I do a POST the result via both CGI.request_method and
getHttpRequestData().method are both displaying GET.