Hi Team,
I am trying to send Http-POST request, but getting the response as
<html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>
Here, providing the Http-POST request, please help us with anything wrong in request forming.
local payload = [[{"email":"evtest@yopmail.com"}]]
local hdrs = {
[1] = string.format('host: %s:%s', addr,port),
[2] = 'Accept: */*',
[3] = 'Content-Type: application/json',
[4] = string.format('Content-Length: %d',#payload)
} local req = {
[1] = 'POST /evl/evIDLookUp HTTP/1.1',
[2] = table.concat(hdrs, '\r\n'),
[3] = '\r\n',
[4] = payload
}
req = table.concat(req, '\r\n')
Thanks,
B.Murali