URLConnection.SetRequestContent
From Xojo Documentation
Method
URLConnection.SetRequestContent(content As String, mimeType As String)
Supported for all project types and targets.
Supported for all project types and targets.
Sets the content data and content type to be sent to the server.
Sample Code
Sends a POST request with JSON:
Var json As New JSONItem
json.Value("ID") = 123456
mySocket.SetRequestContent(json.ToString, "application/json")
mySocket.Send("POST", "http://127.0.0.1:8080/GetCustomer")
json.Value("ID") = 123456
mySocket.SetRequestContent(json.ToString, "application/json")
mySocket.Send("POST", "http://127.0.0.1:8080/GetCustomer")
To send form information, you build the String yourself: