SHARE
TWEET

Untitled

a guest Apr 18th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Insert File To Fault
  2. function insertFileToFault(dictionary)
  3.     Set fso = CreateObject("Scripting.FileSystemObject")
  4.     Set stdout = fso.GetStandardStream(1)
  5.     Set stderr = fso.GetStandardStream(2)
  6.     Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
  7.     URL = "http://omnidatabridge/api/Justin/insertArticleToFault"
  8.     json = createJsonString(dictionary)
  9.     objHTTP.Open "Post", URL, False
  10.     objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0"
  11.     objHTTP.setRequestHeader "Content-Type", "application/json; charset=UTF-8"
  12.     objHTTP.setRequestHeader "CharSet", "charset=UTF-8"
  13.     objHTTP.setRequestHeader "Accept", "application/json"
  14.     objHTTP.Send json
  15.     If objHTTP.Status >= 400 And objHTTP.Status <= 599 Then
  16.     MsgBox "Error Occurred : " & objHTTP.Status & " - " & objHTTP.statusText
  17.     ffPostJSON = False
  18.     End If
  19.     SET insertFileToFault = createDict(objHTTP.ResponseText)
  20. end function
  21.  
  22. 'Add Parameters here
  23. Dim test
  24. Set dic = CreateObject("Scripting.Dictionary")
  25. dic.Add "STOER_ID", "149049"
  26. dic.Add "ART_NR", "21.99.0105"
  27. dic.Add "Anzahl", "1"
  28. dic.Add "UserID", "1093"
  29. SET resolve = insertFileToFault(dic)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top