We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm used to writing my httr2 requests like this:
get_records <- function(inspection_name = "Vespa-Watch", access_token = get_access_token(quiet = TRUE)) { # check input params assertthat::assert_that(assertthat::is.string(access_token)) assertthat::assert_that(assertthat::is.string(inspection_name)) # get the inspection_id for the custom inspection inspection_fields <- get_fields(access_token = access_token, name = inspection_name) # build a request and perform it get_records_request <- httr2::request("https://api.iasset.nl/getCustomInspections") %>% httr2::req_body_form( access_token = access_token, "inspection_ids[0]" = inspection_fields$id, version = "9.7" ) }
but it doesn't work, while this in httr does:
body = list( 'access_token' = access_token, 'version' = '9.7', 'inspection_ids[0]' = inspection_fields$id ) res <- httr::VERB( "POST", url = "https://api.iasset.nl/getCustomInspections", body = body, encode = 'multipart' ) # cat(content(res, 'text')) res %>% httr::content()
The text was updated successfully, but these errors were encountered:
Strangely, my original code seems to work for me today, and rather quickly too. Under 5 seconds. Very strange. I'll keep this open for now
Sorry, something went wrong.
get_records()
Successfully merging a pull request may close this issue.
I'm used to writing my httr2 requests like this:
but it doesn't work, while this in httr does:
The text was updated successfully, but these errors were encountered: