Hi All,
Please help me, I am unable to send request to rest api facing issue but from post man its working
if
CR := 13;
LF := 10;
NewLine += '' + CR + LF;
// Request.GetHeaders(ContentHeaderL);
TempBlob.CreateOutStream(PayloadOutStream);
PayloadOutStream.WriteText('Content-Disposition: form-data; name="NAME"' + NewLine);
PayloadOutStream.WriteText(NewLine);
PayloadOutStream.WriteText('Eric TestWS' + NewLine);
PayloadOutStream.WriteText('multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' + NewLine);
PayloadOutStream.WriteText(NewLine);
TempBlob.CreateInStream(PayloadInStream);
// Write all bytes from the request body stream.
Content.WriteFrom(PayloadInStream);
Content.GetHeaders(ContentHeaderL);
ContentHeaderL.Clear();
ContentHeaderL.Add('Content-Length', '4096'); // this is required I think but when I keep this line request is aborting otherwise is request is success with error in response
ContentHeaderL.Add('Content-Type', 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW');
ContentHeaderL.Add('X-Kount-Api-Key', 'tokenvalue');
Request.Method := 'POST';
Request.SetRequestUri('https://risk.test.kount.net');
Request.GetHeaders(Requestheaders);
Requestheaders.Clear();
Requestheaders.Add('Host', 'risk.test.kount.net');
Request.Content(Content);
Client.Send(Request, Response);