Closed kanhito1981 closed 7 years ago
Have you tried WebHelpers.EnableLogging = True? It show's the JSON at the end of the --> Request section
The most straightforward way is to use the getter for Request.Body
, which returns the converted string that is sent with the request.
Dim Body As New Dictionary
Body.Add "name", "Tim"
Dim Request As New WebRequest
Request.Format = WebFormat.Json
Set Request.Body = Body
Debug.Print Request.Body ' => {"name":"Tim"}
Request.Format = WebFormat.FormUrlEncoded
Debug.Print Request.Body ' => name=Tim
Additionally, I agree with @nmhub, when in doubt, try WebHelpers.EnableLogging = True
somewhere in your code before the request. It logs requests and responses to the Immediate Window (VBA Editor + ctrl+g
).
Is there a way to display the JSON message that was generated before sending it out. Thanks, in advance. SS