まずを使用して、私はSOすでに上で見て、ここに同様の質問が見つかりました:、従来のASPでのRESTのGETすべての
Calling REST web services from a classic asp page
をしかし、これは私の問題を解決していません。私は私が正しい出力を取得し、印刷する私の画面へidentifyUrl
と&が私のブラウザに貼り付けてコピーすると、私のコール
function determineLocationId(identifier)
Dim http: Set http = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
Dim privateKey
privateKey = "myKey"
IdentifyUrl = "https://sandbox.uberall.com/api/locations/?identifier=" & identifier & "&private_key=" & privateKey
With http
Call .Open("GET", identifyUrl, False)
Call .Send()
End With
If Left(http.Status, 1) = 2 Then
response.write("updated")
Else
'Output error
Call Response.Write("Server returned: " & http.Status & " " & http.StatusText)
End If
response.write(identifyUrl)
response.end()
determineLocationId = identifier
end function
が提供する正確な情報を取得する方法を見つけることができません。私は必要な情報を持つjson
-formattedオブジェクト。
私はhttp.responseBody
を印刷する場合は、それだけで、このようないくつかの中国の文字が得られます。
佄呃偙⁅呈䱍倠䉕䥌⁃ჲ⼯㍗⽃䐯䑔䠠䵔⁌⸴吠慲獮瑩潩慮⽬䔯≎∠瑨灴⼺眯睷眮⸳牯⽧剔栯浴㑬氯潯敳搮摴㸢πⴭ䐠瑡楥慮敭>敤慦汵獡⁰㉖〮‰㠰〮⸸〲㈱䠠湡楗汬牆杲杲杲牥ჰ
何が間違っていますか?リンクはdefinetly正しいものです。それはresponseBody
が正しくありませんでした使用して、判明したとして、
Call .SetRequestHeader("Content-Type", "application/json")
成功