Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set objStream = CreateObject("ADODB.Stream")
- objStream.CharSet = "utf-8"
- objStream.Open
- objStream.LoadFromFile("C:request.txt")
- restRequest = objStream.ReadText()
- objStream.Close
- Set objStream = Nothing
- contentType ="application/json"
- Set oWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
- oWinHttp.Open "POST", "http://czcholsint1048.prg-dc.dhl.com:8180/efoms/fulfillOrder", False
- oWinHttp.setRequestHeader "Content-Type", contentType
- oWinHttp.Send restRequest
- response = oWinHttp.StatusText
- {
- "fulfillOrderReq": {
- "hdr": {
- "messageType": "SALESORDER",
- "messageID": "d264502f-aaa2-42a5-a38d-c981ccb99379", "messageVersion": "0.1",
- "messageDateTime": "2015-03-20 09:48:29",
- "appId": "OMS",
- "clientId": "PEP-ESB",
- "reqCompId": "77000001"
- },
- "bd": {
- "orders": [
- {
- "order": {
- "orderNumber": "BAYLINETEST512",
- "salesChannelOrderNumber": "TMALLTEST512",
- "shopName": "拜仁慕尼黑海外旗舰店",
- "salesChannel": "天猫订单",
- "payType": "支付宝",
- "created": "2015-03-20 15:35:58",
- "salesChannelMemberName": "mariahliu621",
- "salesChannelMemberNo": "M-9837423",
- "idCard": "12312",
- "idType": "NATIONAL_IDENTIFICATION_NUMBER",
- "cnee": {
- "name": "SANTOSH",
- "address1": "CHINA",
- "address3": "CHINA",
- "state": "CHINA",
- "city": "CHINA",
- "country": "CN",
- "postCode": "50470",
- "telephone": "18610041036",
- "mobilePhone": "18610041036"
- },
- "cneeMemo": "",
- "cneeMessage": "",
- "sellerMemo": "",
- "otherMemo": "",
- "actualOrderAmount": "792.0",
- "agioAmount": "0.0",
- "discountFee": "0.0",
- "deliveryCost": "70.0",
- "promotionInfo": "",
- "orderItems": [
- {
- "orderItem": {
- "productNumber": "184005",
- "productName": "蜂拥而至CL克 Flock CL gr.",
- "skuNumber": "184005",
- "skuName": "Ribéry",
- "barcode": "",
- "orderGroup": "0",
- "productQty": "1",
- "amount": "75.0",
- "discountFee": "0.0",
- "agioPrice": "90.0",
- "price": "110.0",
- "taxCharges": "100",
- "untaxPrice": "50",
- "dutyCharges": "9",
- "refundStatus": "Normal",
- "memo": ""
- }
- }
- ]
- }
- }
- ]
- }
- }
- }
- Option Explicit
- Dim restReq, url, userName, password
- Set restReq = CreateObject("Microsoft.XMLHTTP")
- ' Replace <node> with the address of your INSTEON device
- ' Additionally, any REST command will work here
- url = "http://isy/rest/nodes/<node>/ST"
- ' If auth is required, replace the userName and password values
- ' with the ones you use on your ISY
- userName = "admin"
- password = "<yourpassword>"
- restReq.open "GET", url, false, userName, password
- restReq.send
- WScript.echo restReq.responseText
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement