Closed jdalberg closed 6 years ago
Hello again :)
I have noticed that when i do a POST towards some function, the Content-Type: application/json header is not set. Shouldn't it always be set?
The missing header results in an error from the remote API I am using.
'headers' => bless( { 'headers' => { 'content-length' => [ 83 ], 'accept-encoding' => [ 'gzip' ], 'user-agent' => [ 'Mojo-OpenAPI (Perl)' ], 'host' => [ '<host>:<port>' ] } }, 'Mojo::Headers' ),
If i do a POST on the commandline, i.e.
curl -H "Content-Type: application/json" -X POST -d '{"foo":"bar"}' http://<host>:<port>/api/myfunction
It works.
So at least the service expects the header to be set.
/Jesper
I finally made up my mind, that this is a bug 👍
Hello again :)
I have noticed that when i do a POST towards some function, the Content-Type: application/json header is not set. Shouldn't it always be set?
The missing header results in an error from the remote API I am using.
If i do a POST on the commandline, i.e.
curl -H "Content-Type: application/json" -X POST -d '{"foo":"bar"}' http://<host>:<port>/api/myfunction
It works.
So at least the service expects the header to be set.
/Jesper