Created
March 23, 2021 10:44
-
-
Save nalgeon/f7dd68f83ef17d8e272f626746aee650 to your computer and use it in GitHub Desktop.
Пример работы с стандартизацией DaData на R. Использует пакет httr (https://github.com/r-lib/httr)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(httr) | |
url <- "https://cleaner.dadata.ru/api/v1/clean/address" | |
headers <- c( | |
"Content-Type" = "application/json", | |
Accept = "application/json", | |
Authorization = "Token API_KEY", | |
"X-Secret" = "SECRET_KEY") | |
body <- list("мск сухонска 11/-89") | |
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