Hello,
I am currently using fphttpclient in order to makes queries to an API with POST request.
My issue is the following one : I can only make on request by object http created.
Is it the normal behaviour of fphttpclient ?
More details about my usage of fphttpclient :
This is how i create my object
FPHttpClient := TFPHttpClient.Create(nil);
I set up some headers at the initialization with the following method
FPHttpClient.AddHeader('Auth-key', x);
I will finally send a bunch of requests in a loop using the following method (catching and handling errors).
FFPHttpClient.RequestBody := BodyStream; //BodyStream is a created stringStream containing my POST datas
try
FPHttpClient.HTTPMethod('POST', URL, AnswerStream, [201]);
finally
FreeAndNil(BodyStream);
end;
Thanks