Created
April 7, 2017 08:36
-
-
Save dancourse/9effd9a0697eb9ed98d20c0db4d1637d to your computer and use it in GitHub Desktop.
notify_orderConfirmSend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Sub notify_orderConfirmSend() | |
Const sUrl As String = "http://tomra.lnx.warwick.ac.uk/api/send/order-confirm" | |
Dim oRequest As WinHttp.WinHttpRequest | |
Dim sResult As String | |
On Error GoTo Err_notify_orderConfirmSend | |
Set oRequest = New WinHttp.WinHttpRequest | |
With oRequest | |
.Open "POST", sUrl, True | |
.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8" | |
.Send "?&strTo=beer_customer@warwick.ac.uk&strSubject=TEST&Strbody=TEST" | |
.WaitForResponse | |
sResult = .ResponseText | |
Debug.Print sResult | |
sResult = oRequest.Status | |
Debug.Print sResult | |
End With | |
Exit_notify_orderConfirmSend: | |
On Error Resume Next | |
Set oRequest = Nothing | |
Exit Sub | |
Err_notify_orderConfirmSend: | |
MsgBox Err.Description, vbExclamation, Err.Number | |
Resume Exit_notify_orderConfirmSend | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment