Delphi HttpResponse Error Solution

Error: No mapping for the Unicode character exists in the target multi-byte code page

var
HttpClient: THttpClient;
HttpResponse: IHttpResponse;
begin
HttpClient := THTTPClient.Create;
try
HttpResponse := HttpClient.Get(AURL);
//Result := HttpResponse.ContentAsString();
Result := HttpResponse.ContentAsString(TEncoding.ANSI);
finally
HttpClient.Free;
end;
end;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s