Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Пример работы с подсказками DaData на R. Использует пакет httr (https://github.com/r-lib/httr)
library(httr)
url <- "https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/party"
headers <- c(
"Content-Type" = "application/json",
Accept = "application/json",
Authorization = "Token YOUR_API_KEY")
body <- list(
query = "7719402047")
r <- POST(url = url,
config = c(add_headers(headers), accept_json()),
body = body,
encode = "json")
content(r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment