Skip to content

Instantly share code, notes, and snippets.

@nalgeon
Last active April 9, 2024 03:22
Show Gist options
  • Save nalgeon/195b6f69a3901262caa033a360c199b6 to your computer and use it in GitHub Desktop.
Save nalgeon/195b6f69a3901262caa033a360c199b6 to your computer and use it in GitHub Desktop.
Пример работы с подсказками DaData на VBScript
Dim http
Set http = CreateObject("WinHttp.WinHttpRequest.5.1")
timeout = 2000 'milliseconds
http.SetTimeouts timeout, timeout, timeout, timeout
query = "7719402047"
request = "{ ""query"": """ & query & """ } "
http.Open "POST", "https://suggestions.dadata.ru/suggestions/api/4_1/rs/findById/party"
http.SetRequestHeader "Content-Type", "application/json"
http.SetRequestHeader "Authorization", "Token ВАШ_API_ключ"
http.Send request
resp = http.ResponseText
WScript.Echo resp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment