synRestGetAsync: synRestGetAsync

synRestGetAsyncR Documentation

synRestGetAsync

Description

Sends an HTTP GET request to the Synapse server.

Usage

synRestGetAsync(uri, endpoint=NULL, headers=NULL, retry_policy=list(), requests_session_async_synapse=NULL)

Arguments

uri

URI on which get is performed

endpoint

Server endpoint. Defaults to repoEndpoint

headers

Dictionary of headers to use

retry_policy

A retry policy that matches the arguments of synapseclient.core.retry.with_retry_time_based_async.

requests_session_async_synapse

The async client to use when making this specific call.

...

Any other arguments taken by a request method

Value

JSON encoding of response

Examples

## Not run: 
# a helper function to run async function
run_coroutine <- function(coroutine) {
    asyncio <- import("asyncio")
    result <- asyncio$run(coroutine)
    return(result)
    }
# run the coroutine
result <- run_coroutine(synRestGetAsync(uri="/entity/entity_id"))

## End(Not run)

Sage-Bionetworks/synapser documentation built on Aug. 23, 2024, 11:07 a.m.