post_ga4gh: POST to a GA4GH Server

Description Usage Arguments Examples

Description

Use this to POST a request to an operation. The operations should simply be specified as a path in the API i.e. "/datasets/search" to search datasets. The body can be json or an R list. Use the search_* functions for a simpler interface.

Usage

1
post_ga4gh(client, operation, body)

Arguments

client

A ga4gh_client object

operation

The API operation to POST to as a string. Eg "/datasets/search"

body

The body of the POST either as JSON or a list (which will be converted to json by httr)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Create a client
ref_client <- ga4gh_client("http://1kgenomes.ga4gh.org", api_location = "", log_level = 1)

## A request body as a list
body_list <- list(pageSize = 2)

## Not run: 
## Post to the /datasets/search operation
datasets_list <- ref_client %>% post_ga4gh("/datasets/search", body_list) %>% content
datasets_list


## End(Not run)

Rga4gh documentation built on May 1, 2019, 6:35 p.m.