Skip to content

Instantly share code, notes, and snippets.

@michaelterryio
Created July 14, 2021 04:42
Show Gist options
  • Save michaelterryio/ef7f2dd96e8b6706090374ebbaaad370 to your computer and use it in GitHub Desktop.
Save michaelterryio/ef7f2dd96e8b6706090374ebbaaad370 to your computer and use it in GitHub Desktop.
Very simple web request for VBA-Web and Mac
Public Sub FetchExample()
  Dim Client As New WebClient
  Client.BaseUrl = "https://example.com/"
  Dim Request As New WebRequest
  Request.Format = WebFormat.PlainText
  Request.Method = WebMethod.HttpGet
  Dim Response As WebResponse
  Set Response = Client.Execute(Request)
  Debug.Print Response.Content
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment