| BiodbRequest | R Documentation |
Class Request.
Class Request.
This class represents a Request object that can be used with the Request Scheduler.
new()Initializer.
BiodbRequest$new(
url,
method = c("get", "post"),
header = character(),
body = character(),
encoding = integer(),
conn = NULL
)urlA BiodbUrl object.
methodHTTP method. Either "get" or "post".
headerThe header.
bodyThe body.
encodingThe encoding to use.
connA valid BiodbConn instance for which this request is built.
Nothing.
setConn()Sets the associated connector (usually the connector that created this request).
BiodbRequest$setConn(conn)
connA valid BiodbConn object.
Nothing.
getConn()gets the associated connector (usually the connector that created this request).
BiodbRequest$getConn()
The associated connector as a BiodbConn object.
getUrl()Gets the URL.
BiodbRequest$getUrl()
The URL as a BiodbUrl object.
getMethod()Gets the method.
BiodbRequest$getMethod()
The method as a character value.
getEncoding()Gets the encoding.
BiodbRequest$getEncoding()
The encoding.
getCurlOptions()Gets the options object to pass to cURL library.
BiodbRequest$getCurlOptions(useragent)
useragentThe user agent as a character value.
An RCurl options object.
getUniqueKey()Gets a unique key to identify this request. The key is an MD5 sum computed from the string representation of this request.
BiodbRequest$getUniqueKey()
A unique key as an MD5 sum.
getHeaderAsSingleString()Gets the HTTP header as a string, concatenating all its information into a single string.
BiodbRequest$getHeaderAsSingleString()
The header as a single character value.
getBody()Gets the body.
BiodbRequest$getBody()
The body as a character value.
print()Displays information about this instance.
BiodbRequest$print()
self as invisible.
toString()Gets a string representation of this instance.
BiodbRequest$toString()
A single string giving a representation of this instance.
clone()The objects of this class are cloneable with this method.
BiodbRequest$clone(deep = FALSE)
deepWhether to make a deep clone.
BiodbRequestScheduler, BiodbUrl.
# Create an instance with default settings:
mybiodb <- biodb::newInst()
# Create a request object
u <- 'https://www.ebi.ac.uk/webservices/chebi/2.0/test/getCompleteEntity'
url <- BiodbUrl$new(url=u)
url$setParam('chebiId', 15440)
request <- BiodbRequest$new(method='get', url=url)
# Send request
mybiodb$getRequestScheduler()$sendRequest(request)
# Terminate instance.
mybiodb$terminate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.