Closed schaffman5 closed 1 month ago
thanks @schaffman5 I have the same issue on my side trying to read api spec from IATI https://iatistandard.org/ that is versioning the APIs, and that allows getting the specification through a GET request that needs a specific header ie. Accept: application/vnd.swagger.doc+json @bergant is it ok for that I send a pull request for this enhancement? If you need integration tests let me know
Sorry for the delay. Please tag me for future issues. Resolved in be89a8f5a963becc5f3f0862cf702fac70d6c789
There is an issue in the
get_api
function when the API requires specific headers to be set in order to view the page content. An example is when the API requires a token to be set in the httr::config header before it will return the API details.The provided example does not work likely because of this issue, e.g.
To resolve this, the
get_api
function should, itself, use the config parameter when requesting content from the api url. e.g.