Can you please provide more details?
My methods:
procedure TdmRENV.DataModuleDestroy(Sender: TObject);
begin
FClient.Free;
end;
procedure TdmRENV.DataModuleCreate(Sender: TObject);
begin
FClient := THTTPClient.Create;
end;
function TdmRENV.DoRequest(HttpMethod: THttpMethod; EndPoint: string; var
ReqHeaders: TReqHeaders; BodyContent: string; HttpContentType:
THttpContentType = application_json; HttpBodyType: THttpBodyType = StringBody): string;
var
Resp: THttpResponse;
Req: THttpRequest;
ReqHeader: TReqHeader;
I: integer;
HeaderName, HeaderValue: string;
const
RENVUri = '...';
begin
Resp := nil;
Req := FClient.CreateRequest;
try
// set uri
Req.Uri := RENVUri + EndPoint;
// set request method
...
// set custom headers, if any
...
// set content body, if available.
...
// set content type
...
// perform request
Resp := FClient.Send(Req);
if Resp.StatusCode <> 200 then
raise Exception.Create(Format('%d %s', [Resp.StatusCode, Resp.StatusReason]))
else if IsTextResponse(Resp.ContentType) then
Result := TEncoding.Default.GetString(Resp.ContentAsBytes)
else
Result := FillBinaryBody(Resp.ContentAsBytes);
finally
Req.Free;
Resp.Free;
end;
end;
A way to reproduce the issue?
Unfortunately, the public server needs authorisation (with a private user and password) and use geolocation filters
What you are doing in postman?
I test some scenarios like:
- log in (with user and password) and read the Bearer token
- get all catalogus
- register some persons
- register some info about a person
- read info about a person
- and so one
I use both versions of the postman: the web edition and the desktop. In this particular case (the production server), I use the desktop version (windows 10) because there are some geolocation filters. On the same computer, I installed our Delphi/TMS app and I receive the Error: (12175) Error in Server SSL Certificate Expired certificate!