Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

wstring format for http put

bartm
2020-04-08
2020-04-08
  • bartm - 2020-04-08

    I'm struggling to sent a wstring(100) with httpclient: "{$"on$":true, $"bri$":150}"
    there are no compile errors, it seems that there's only a part of the wstring sent: "{"on":true, ""
    Any tips?

     
  • i-campbell

    i-campbell - 2020-04-08

    It looks like you are getting exactly half of your message.
    A WSTRING has roughly twice as many bytes as a byte array.
    I wonder if the two facts are related?

     
    • bartm - 2020-04-08

      That's it!
      Wstring characters are of a different length.
      Changing to Wstring(200) does the trick.

       
      πŸ‘
      1

Log in to post a comment.