|
|
# Notes on clients accessing DBnomics
|
|
|
|
|
|
## rdbnomics
|
|
|
### Compatibility issues (R version)
|
|
|
With R version 3.5.2,
|
|
|
```
|
|
|
httr::GET("https://api.next.nomics.world/series?provider_code=WB&dataset_code=DB&dimensions={\"country\": [\"DZ\", \"BT\", \"PE\"],\"indicator\": [\"IC.DCP.BQCI\",\"IC.REG.COST.PC.ZS\"]}")
|
|
|
```
|
|
|
is received as
|
|
|
```
|
|
|
"GET /series?provider_code=WB&dataset_code=DB&dimensions={\x22country\x22: HTTP/1.0" 400 201 "-" "libcurl/7.47.1
|
|
|
r-curl/0.9.7 httr/1.1.0"
|
|
|
```
|
|
|
by the server, but
|
|
|
```
|
|
|
httr::GET("https://api.next.nomics.world/series?provider_code=WB&dataset_code=DB&dimensions={\"country\": [\"DZ\", \"BT\", \"PE\"],\"indicator\": [\"IC.DCP.BQCI\",\"IC.REG.COST.PC.ZS\"]}", as="text", encoding = "UTF-8")
|
|
|
```
|
|
|
is received correctly as
|
|
|
```
|
|
|
"GET /series?provider_code=WB&dataset_code=DB&dimensions=%7B%22country%22%3A%20%5B%22DZ%22%2C%20%22BT%22%2C%20%22PE%22%5D%2C%22indicator%22%3A%20%5B%22IC.DCP.BQCI%22%2C%22IC.REG.COST.PC.ZS%22%5D%7D HTTP/1.1" 200 779 "-" "libcurl/7.47.1 r-curl/0.9.7 httr/1.1.0"
|
|
|
62.23.47.190 - - [23/Mar/2018:15:50:12 +0100] "GET /series?provider_code=WB&dataset_code=DB&dimensions={\x22country\x22: HTTP/1.0" 400 201 "-" "libcurl/7.47.1
|
|
|
r-curl/0.9.7 httr/1.1.0"
|
|
|
```
|
|
|
by the server. Note that the use of options ``as`` and ```encoding``` in ``httr::GET`` isn't documented. |