ropensci-archive/fulltext

Having a way to see full http response body ?

behrica opened this issue · 4 comments

I know that we can pass verbose=TRUE,
but that does not show the response body.

I read about the "hooks", but could not get it working.

For my problem described in #220 , it would have helped me if I could have seen, if or if not, the abstract text was in the http response or not.

I just see that "hooks" is not supported as a parameter in "scopus_get", correct ?
Looking at this:

debugging in: scopus_get(url, list(), key, curlopts)
debug: {
    cli <- crul::HttpClient$new(url = url, headers = list(`X-ELS-APIKey` = key), 
        opts = c(curlopts, list(...)))

Is there an other way to see the response, except via debugging ?

verbose=TRUE only shows curl request and response headers, not request or response bodies. One thing I often do is use verbose=TRUE to get what request is being sent then use curl -v (-v is the same as verbose=TRUE in R) on the command line to see the entire response. I don't think you could use hooks as I think we only allow curl options to be passed in to the opts parameter https://docs.ropensci.org/crul/reference/HttpClient.html#public-fields. (short for curl options).

What response are you trying to see?

The full response body. That would have helped me to see, that the responses missed already something.

Specifically what request though? What function and what query