synRestPostAsync.Rd
Sends an HTTP POST request to the Synapse server.
synRestPostAsync(uri, body=NULL, endpoint=NULL, headers=NULL, retry_policy=list(), requests_session_async_synapse=NULL)
URI on which get is performed
The payload to be delivered
Server endpoint. Defaults to repoEndpoint
Dictionary of headers to use
A retry policy that matches the arguments of synapseclient.core.retry.with_retry_time_based_async.
The async client to use when making this specific call.
Any other arguments taken by a request method
JSON encoding of response
if (FALSE) {
library(jsonlite)
# create payload
request <- list(includeEntity = TRUE)
body <- toJSON(request, auto_unbox = TRUE)
# a helper function to run async function
run_coroutine <- function(coroutine) {
asyncio <- import("asyncio")
result <- asyncio$run(coroutine)
return(result)
}
# run the coroutine to get the bundle
result <- run_coroutine(synRestPostAsync(uri="/entity/entity_id/bundle2",body=body))
}