diff --git a/R/resp-url.R b/R/resp-url.R index 6fb84c71..2c90beee 100644 --- a/R/resp-url.R +++ b/R/resp-url.R @@ -8,12 +8,14 @@ #' @inheritParams resp_header #' @export #' @examples -#' req <- request("https://httr2.r-lib.org?hello=world") +#' resp <- request(example_url()) %>% +#' req_url_path("/get?hello=world") %>% +#' req_perform() #' -#' resp <- req_perform(req) #' resp %>% resp_url() #' resp %>% resp_url_path() -#' resp %>% resp_url_query() +#' resp %>% resp_url_queries() +#' resp %>% resp_url_query("hello") resp_url <- function(resp) { check_response(resp) diff --git a/man/resp_url.Rd b/man/resp_url.Rd index 7463937d..9559ca20 100644 --- a/man/resp_url.Rd +++ b/man/resp_url.Rd @@ -31,10 +31,12 @@ resp_url_queries(resp) } } \examples{ -req <- request("https://httr2.r-lib.org?hello=world") +resp <- request(example_url()) \%>\% + req_url_path("/get?hello=world") \%>\% + req_perform() -resp <- req_perform(req) resp \%>\% resp_url() resp \%>\% resp_url_path() -resp \%>\% resp_url_query() +resp \%>\% resp_url_queries() +resp \%>\% resp_url_query("hello") }