I'm building load tests for a web API, and I can't get one of them to work.
The url is something like http://myserver/myapp/mymethod
and it calls a java method like public void mymethod(mytype param)
And I don't know how to pass that param...
I'm getting this error:
The server refused this request because the request entity is in a format not supported by the requested resource for the requested method (Cannot consume content type).
EDIT:
I've tried setting Content-Type = "application/json"
and passing a json parameter but now the server says: An error occured while trying to do a POST request.: java.net.SocketException: Unexpected end of file from server
The parameter, which is correct and I can get the values when debugging the webservice is:
{
"email": "name@server.com",
"login": "name",
"password": "1234"
}