I have the following JSON request sample code from an API service provider
I converted the sample to VBA as follows:
I wasn't quite sure where the POST /services/shipper/orders HTTP/1.1 goes in the header?
Code:
HTTP Method: POST
URL: /services/shipper/orders
Code:
POST /services/shipper/orders HTTP/1.1
Content-Type: application/json
User-Agent: Mozilla 5.0
Host: api.epackcne.com
Date: Tue, 06 Jan 2018 21:20:27 GMT
Token: test12345678901234
Code:
With JsonHTTP
.Open "POST", url, False
.setRequestHeader "RequestName", "application/json"
.setRequestHeader "Accept", "application/json"
.setRequestHeader "User-Agent", "Mozilla 5.0"
.setRequestHeader "Host", "api.epackcne.com"
.setRequestHeader "X-WallTech-Date", "Tue, 06 Jan 2018 21:20:27 GMT"
.setRequestHeader "Authorization", "test12345678901234"
.send (body)
End With
I wasn't quite sure where the POST /services/shipper/orders HTTP/1.1 goes in the header?