ocsRequest: ocsRequest

ocsRequestR Documentation

ocsRequest

Description

ocsRequest

ocsRequest

Format

R6Class object.

Value

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

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

Super class

ocs4R::ocs4RLogger -> ocsRequest

Methods

Public 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.

Note

Abstract class used internally by ocs4R

Author(s)

Emmanuel Blondel <emmanuel.blondel1@gmail.com>


ocs4R documentation built on April 30, 2026, 1:07 a.m.