Hello Team,
I tried to test my API. I posted a JSON with many possibility of header and body settings/parameters, but I always got 404 Not found result OR content-lenght Error.
Can you recommend a solution, please. Thanks!
(1) I got valid auth token and the header was updated:
(2) I had 16 chars in body JSON
(3) Tried to post without content-lenght, but I got 404 Not found.
(4) here is the header with content lenght =16
(5) but I got error message, that Content length is : org.apache.http.ProtocolException: Content-Length header already present
(5) here is the Error message:
com.kms.katalon.core.webservice.exception.SendRequestException: org.apache.http.client.ClientProtocolException
at com.kms.katalon.core.webservice.common.HttpUtil.sendRequest(HttpUtil.java:153)
at com.kms.katalon.core.webservice.common.BasicRequestor.send(BasicRequestor.java:58)
at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:150)
at com.kms.katalon.composer.webservice.parts.RestServicePart$8.run(RestServicePart.java:283)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at com.kms.katalon.core.webservice.common.HttpUtil.sendRequest(HttpUtil.java:125)
… 4 more
Caused by: org.apache.http.ProtocolException: Content-Length header already present
at org.apache.http.protocol.RequestContent.process(RequestContent.java:97)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
… 6 more