Replies: 2 comments 4 replies
-
Try .AddHeader('client-id', edClientId.Text) |
Beta Was this translation helpful? Give feedback.
1 reply
-
.AddHeader('Client-id', edClientId.Text, [poDoNotEncode]) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Good day
How can I pass the Client-id and the Client-Secret to POST Request.
This is the post comand:
`procedure TFrmMain.btnPOSTClick(Sender: TObject);
var
LResponse: IResponse;
begin
LResponse := TRequest.New.BaseURL(edtBaseURL.Text)
.Accept(edtAccept.Text)
.AddBody(mmCustomBody.Lines.Text)
.AddHeader('Client-id', edClientId.Text)
.AddHeader('Client-secret', edClientSecret.Text)
.Post;
mmBody.Lines.Text := LResponse.Content;
lblStatusCode.Caption := LResponse.StatusCode.ToString;
end;`
This is the Error a I get
{"timestamp":"2022-08-03T12:20:23.098+00:00","status":400,"error":"Bad Request","message":"Missing request header 'client-id' for method parameter of type String","path":"/integration/hsusa/gadint"}
Thanks
Beta Was this translation helpful? Give feedback.
All reactions