R programming _ get function for http with query parameters-

Viewed 302

I'm using R programming and httr package to request a HTTP

I want to apply get function for http using query parameters.

GET(url = NULL, config = list(), ..., handle = NULL)

the request contains , seperated by question mark ? 1- url https://example.com 2- url parameter:'title='

# Function to Get Links to specific page
page_link <- function(){

url <- "https://example.com?"
q1 <- list (title = "")
page_link<- GET (url, query = q1)
return (page_link)

}

1 Answers

If you're asking how to bind the url to get one element to request with GET, you should try paste0(), e.g.:

url <- paste0("https://example.com?",q1[x])<br>
page_link <- GET(url)
Related