|
@@ -113,9 +113,16 @@ end;
|
|
|
{ TFPHTTPWebClient }
|
|
|
|
|
|
Function TFPHTTPWebClient.DoCreateRequest: TWebClientRequest;
|
|
|
+
|
|
|
+Var
|
|
|
+ C : TFPHTTPClient;
|
|
|
+
|
|
|
begin
|
|
|
- Result:=TFPHTTPRequest.Create(TFPHTTPClient.Create(Self));
|
|
|
- Result.Headers.NameValueSeparator:=':';
|
|
|
+ C:=TFPHTTPClient.Create(Self);
|
|
|
+ C.RequestHeaders.NameValueSeparator:=':';
|
|
|
+ C.ResponseHeaders.NameValueSeparator:=':';
|
|
|
+// C.HTTPversion:='1.0';
|
|
|
+ Result:=TFPHTTPRequest.Create(C);
|
|
|
end;
|
|
|
|
|
|
Function TFPHTTPWebClient.DoHTTPMethod(Const AMethod, AURL: String;
|
|
@@ -124,7 +131,7 @@ Function TFPHTTPWebClient.DoHTTPMethod(Const AMethod, AURL: String;
|
|
|
Var
|
|
|
U,S : String;
|
|
|
h : TFPHTTPClient;
|
|
|
- Res : Boolean;
|
|
|
+
|
|
|
|
|
|
begin
|
|
|
U:=AURL;
|
|
@@ -145,7 +152,7 @@ begin
|
|
|
H.RequestBody:=ARequest.Content;
|
|
|
H.RequestBody.Position:=0;
|
|
|
end;
|
|
|
- H.HTTPMethod(AMethod,U,Result.Content,[]); // Will rais an exception
|
|
|
+ H.HTTPMethod(AMethod,U,Result.Content,[]); // Will raise an exception
|
|
|
except
|
|
|
FreeAndNil(Result);
|
|
|
Raise;
|