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.