Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

REST and No mapping for the Unicode character exists

REST and No mapping for the Unicode character exists

REST and No mapping for the Unicode character exists

I am trying to get PDF from via API but when in command restrequest.Execute happens then program crashes with error:
No mapping for the Unicode character exists in the target multi-byte code page.
Does anybody have any idea what is wrong it?
This works with postman so problem must be in my delphi code.

RESTClientx := TRESTClient.Create(nil);
restclientx.AcceptCharset := 'uft-8, *;q=0.8';
restclientx.ContentType := 'application/x-www-form-urlencoded';
restclientx.FallbackCharsetEncoding := 'raw';
restclientx.BaseURL := 'https://ee.integration.dpd.eo.pl/ws-mapper-rest/pa..._';

RESTResponsex := TRESTResponse.Create(nil);
RESTRequestx:= TRESTRequest.Create(nil);

restrequestx.Client := RESTClientx;

RESTRequestx.Method := rmpost;

RESTRequestx.Params.Items[0].Kind := pkHTTPHEADER;
RESTRequestx.Params.Items[0].name := 'username';
RESTRequestx.Params.Items[0].Value := 'xxxxxxx';
RESTRequestx.Params.Items[0].Options := [poDoNotEncode];

RESTRequestx.Params.Items[1].Kind := pkHTTPHEADER;
RESTRequestx.Params.Items[1].name := 'password';
RESTRequestx.Params.Items[1].Value := 'xxxxxxxx';
RESTRequestx.Params.Items[1].Options := [poDoNotEncode];

RESTRequestx.Params.Items[2].Kind := pkHTTPHEADER;
RESTRequestx.Params.Items[2].name := 'parcels';
RESTRequestx.Params.Items[2].Value := '01234567890';
RESTRequestx.Params.Items[2].Options := [poDoNotEncode];

RESTRequestx.Params.Items[3].Kind := pkHTTPHEADER;
RESTRequestx.Params.Items[3].name := 'printType';
RESTRequestx.Params.Items[3].Value := 'pdf';
RESTRequestx.Params.Items[3].Options := [poDoNotEncode];

restrequestx.Execute; <- this will cause error

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close