No not like this
structureBody is the structure in which the order data is stored. This structure is converted to a JSON file:
Code |
---|
JSONWriter = New JSONWriter;
JSONWriter.SetString();
WriteJSON(JSONWriter, structureBody);
resultJSON = JSONWriter.Close(); |
resultJSON is a ready-made JSON file to be sent to the server.
And the parameters for HTTPRequest are set here:
Code |
---|
HTTPRequest = New HTTPRequest();
HTTPRequest.ResourceAddress = ResourceAddress;
HTTPRequest.Headers.Insert("Content-Type", "application/json");
HTTPRequest.Headers.Insert("X-Shopify-Access-Token", Constants.Shopify_API_Access_Token.Get());
|