THttpRequest POST params


I'm trying to send a POST request to a server, that expects username and password as parameters.

I tried in Postman and works perfectly, but I don't know how to do it in Delphi.

I tried to add the params to the request header,

Req.Headers.SetValue('userName', 'user');  
Req.Headers.SetValue('password', 'pass');  

Response := Client.Send(Req);

or in the body:

Params := TStringList.Create;
Params.Add('userName='+User);  // tried also ":" instread of "=".

but in both cases I get the error:

	"message": "Incorrect value of parameter \"userName\"!",
	"exceptionClass": "si.zzi.rose.edi.RoseEdiException",
	"stack": [],
	"suppressed": []

Since executing on Postman works flawlessly, I presume is a problem of where put the params for the request.

I would kindly ash for support.


note the swaggerui. Bellow userName and password it says query.
So i'd assume that you put them on query https://....?userName=user&password=pass

If it doesn't work, copy paste curl command line from postman here, (masking critical data, of course)