Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Servlet component ignores "Content-Type" Header

$
0
0
Hi,

I am using the Servlet component to expose a URL that consumes HTTP
Requests. When I tested using the RESTClient extension for Firefox
everything went fine. However, it is failing when receiving the request from
the service that will handle this task. I get the following error:

Cannot read request parameters due Invalid parameter, expected to be a pair
but was...

I noticed that this is caused because the Content-Type is set to
"application/x-www-form-urlencoded" even though it is sent as
"application/json". The RESTClient extension sends "plain/text" and works
well, but the REST Easy Firefox extension is also unable to set the
Content-Type header as it is ignored.

Is there something I need to do in order to accept the Content-Type header?

Thanks for your help!

Pablo

Viewing all articles
Browse latest Browse all 5648

Trending Articles