From Xojo Documentation


URLConnection.SetRequestContent(content As String, mimeType As String)

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", "")

To send form information, you build the String yourself:

// Build form String
Var formText As String = "firstName=Bob&lastName=Roberts"

// POST it
mySocket.SetRequestContent(formText, "application/x-www-form-urlencoded")
mySocket.Send("POST", "http://www.webserviceurl.com")