new_request: Return an API request object

View source: R/request.R

new_requestR Documentation

Return an API request object

Description

Return an API request object with everything needed to make a request.

Usage

new_request(client, operation, params, data, dest = NULL)

Arguments

client

A service client, e.g. from new_service.

operation

An operation, e.g. from new_operation.

params

A populated input object.

data

An empty output object.

dest

Control where the response body is written

See Also

Other API request functions: new_handlers(), new_operation(), new_service(), send_request()

Examples

## Not run: 
# Make a request object for the S3 ListBuckets operation.
metadata <- list(
  endpoints = list("*" = list(endpoint = "s3.{region}.amazonaws.com", global = FALSE)),
  service_name = "s3"
)
client <- new_service(metadata, new_handlers("restxml", "s3"))
op <- new_operation("ListBuckets", "GET", "/", list())
params <- list()
data <- tag_add(list(Buckets = list()), list(type = "structure"))
req <- new_request(client, op, params, data)

## End(Not run)


paws.common documentation built on Oct. 4, 2024, 1:08 a.m.