I’m trying to capture the sample data from the HTTPSocketPostExample project on an PHP page.
on var_dump($_POST); I see the uploaded data.
Using this function
Antonio, I see. I wrongly assumed I was sending JSON from XOJO.
When I define it like this:
Dim d As New JSONItem
//This object is manipulated like a dictionary
d.Value("Test") = "abc"
d.Value("Value2") = "xyz"
Socket.Yield=True
Socket.SetRequestContent(d.ToString,"application/json; charset=utf-8")
Socket.Post("http://httpbin.org/post")
Is this the right way to send it a server?
the reason why I think I need JSON is because some of the strings I’ll be sending are quite long (> 1000 characters).
Just using POST seems to truncate what I send.