request: Request an endpoint from Ensembl REST API

View source: R/request.R

requestR Documentation

Request an endpoint from Ensembl REST API

Description

Performs a GET request on the endpoint as specified by resource_url.

Usage

request(
  resource_url,
  base_url = ensembl_server(),
  verbose = FALSE,
  warnings = TRUE
)

Arguments

resource_url

Endpoint URL. The endpoint is internally appended to the base_url. It should start with a forward slash ('/').

base_url

The Ensembl REST API base URL.

verbose

Whether to be verbose.

warnings

Whether to print warnings.

Value

A named list of four elements:

url

The URL endpoint.

response_code

HTTP status code.

status

A string describing the status of the response obtained: "OK" if successful or a description the error.

content

The parsed JSON as a nested list, as returned by fromJSON.


ramiromagno/ensemblr documentation built on Oct. 19, 2023, 11:12 a.m.