I have a JSON URl - https://{{API_HOST}}/api/dd/new which needs to be parsed in R. It has a Key and Value, Through which I am easily able to parse the JSON in Postman by applying key and value in Headers section. Looking a way to do the same in R using Key and Value.
I am aware about how to parse JSON using basic authentication.
Code:
library(jsonlite)
library(httr)
Url <- "https://{{API_HOST}}/api/dd/new"
Url.Response <- GET(Url,authenticate("string","password"))
RawJson <- rawToChar(Url.Response$content)
JsonData <- fromJSON(RawJson)
JsonDataDf <- as.data.frame(JsonData)
Looking for similar way in R to parse the JSON Url using Key and Value. Do add_headers will help here. Let the Key be STRING, Value be qwertzuiop