How to convert String to Byte Array and vice versa?

Asked

Viewed 327 times

2

I need to send an XML via post, but according to the service documentation, it is necessary that the data is sent "in bytes". So, I have the XML in question inside a Tstringlist. How to turn it into an array of bytes? Any idea? I appreciate any help, hugs!

  • 2

    http://www.devmedia.com.br/string-para-byte-byte-para-string-delphi/18056 But I don’t think that’s what you need. The dialog with webservice is by text (XML, json, Base64...) and not by "array of bytes".

  • Thanks for the reply friend! Really, I’ve done communication via webservice other times. But unfortunately, in this case, that’s it. Thank you very much!

  • 1

    Has some link to the documentation, because it will probably be necessary to transform into UTF8, but this needs to be clear

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.