Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. Create a new instance of WinHttp.WinHttpRequest.5.1 object.
  2. Set the request method using the .Open method (e.g. .Open "GET", "http://www.example.com", false).
  3. Set any required request headers using the .SetRequestHeader method (e.g. .SetRequestHeader "Content-Type", "application/json").
  4. Set any required request data using the .Send method (e.g. .Send "{'key':'value'}").
  5. Retrieve the response headers using the .GetAllResponseHeaders method.
  6. Retrieve the response body using the .ResponseBody property.
  7. Handle the response as necessary (e.g. parse JSON response, write response to file, etc.).