zerocode
zerocode copied to clipboard
When body is blank and hitting POST request getting "Length Required" error 411
Below is log -
url:https://test.com/APIGateway/api/v1/TestSub
method:POST
**request:**
{
"headers" : {
"Authorization" : "Bearer dasd.dasd.dasdsd",
"IPAdress" : "192.168.1.1",
"BrowserSessionID" : "rerdfsd",
"ServiceType" : "web",
"Content-Type" : "application/json",
"AuthToken" : "12333-FD7E-4834-AD3B-4234324"
},
"body" : { }
}
**Response:**
{
"status" : 411,
"headers" : {
"Date" : [ "Tue, 25 Jun 2024 16:45:10 GMT" ],
"Server" : [ "Microsoft-HTTPAPI/2.0" ],
"Content-Length" : [ "344" ],
"Content-Type" : [ "text/html; charset=us-ascii" ],
"Connection" : [ "close" ]
},
"rawBody" : "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\"http://www.w3.org/TR/html4/strict.dtd\">\r\n<HTML><HEAD><TITLE>Length Required</TITLE>\r\n<META HTTP-EQUIV=\"Content-Type\" Content=\"text/html; charset=us-ascii\"></HEAD><p>HTTP Error 411. The request must be chunked or have a content length.</p>\r\n</BODY></HTML>\r\n"
}
In Postman, same request works properly. Please do needful help. I am using zerocode-tdd.version - 1.3.35 and 1.3.43