HTTPSocket.SetRequestContent(Content , ContentType?)

I need to communicate with a webservice in a way I have not had to before, and I am not very web savvy.

Besides needing to put my “credentials” into a header (think I figured that from the Xojo docs) need to post the request as a JSON string in the request body.

The JSON is 2 arrays… The first an array of record IDs and the second an array of field names for what information I want from each records…

Figuring out how to produce the JSON was again straight froward from the Xojo Docs… but the last thing I need to do is not

I assume I need to do:
HTTPSecureSocket.SetRequestContent(JSONItem.ToString , ContentType)

before I do the post…

Is that right? But even if it is, while it likely is obvious to anybody who is web savvy, I have no idea what content type should be set to!!!

Any ideas?


  • karen

Yes, SetRequestContent is correct. Use “application/json” for the content type.

Thanks! I will try that

  • karen