Learn R Programming

ocs4R (version 0.3)

ocsRequest: ocsRequest

Description

ocsRequest

ocsRequest

Arguments

Value

Object of R6Class for modelling a generic 'ocs' web-service request

Format

R6Class object.

Methods

new(type, url, request, user, pwd, token, cookies, format, namedParams, content, contentType, filename, logger, ...)

This method is used to instantiate a object for doing an 'ocs' web-service request

getRequest()

Get the request payload

getRequestHeaders()

Get the request headers

getStatus()

Get the request status code

getResponse()

Get the request response

getException()

Get the exception (in case of request failure)

getResult()

Get the result TRUE if the request is successful, FALSE otherwise

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super class

ocs4R::ocs4RLogger -> ocsRequest

Methods

Inherited methods


Method new()

This method is used to instantiate a object for doing an 'ocs' web-service request

Usage

ocsRequest$new(
  type,
  url,
  request,
  user = NULL,
  pwd = NULL,
  token = NULL,
  cookies = NULL,
  format = "json",
  namedParams = list(),
  content = NULL,
  contentType = "text/plain",
  filename = NULL,
  logger = NULL,
  ...
)

Arguments

type

type of request

url

url

request

request

user

user

pwd

pwd

token

token

cookies

cookies

format

format. Default is "json"

namedParams

a list of named parameters

content

content

contentType

content type. Default is "text/plain"

filename

file name

logger

logger

...

additional parameters


Method execute()

Executes the request

Usage

ocsRequest$execute()


Method getRequest()

Get request

Usage

ocsRequest$getRequest()


Method getRequestHeaders()

Get request headers

Usage

ocsRequest$getRequestHeaders()


Method getStatus()

Get status

Usage

ocsRequest$getStatus()


Method getResponse()

Get response

Usage

ocsRequest$getResponse()


Method getException()

Get exception

Usage

ocsRequest$getException()


Method getResult()

Get result

Usage

ocsRequest$getResult()


Method setResult()

Set result

Usage

ocsRequest$setResult(result)

Arguments

result

result


Method clone()

The objects of this class are cloneable with this method.

Usage

ocsRequest$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.