RequestResult: Class RequestResult.

RequestResultR Documentation

Class RequestResult.

Description

Class RequestResult.

Class RequestResult.

Details

Represents the result of a request.

Methods

Public methods


Method new()

New instance initializer.

Usage
RequestResult$new(
  content = NULL,
  retry = FALSE,
  errMsg = NULL,
  status = 0,
  statusMessage = "",
  retryAfter = NULL,
  location = NULL
)
Arguments
content

The result content.

retry

If request should be resent.

errMsg

Error message.

status

HTTP status.

statusMessage

Status message.

retryAfter

Time after which to retry.

location

New location.

Returns

Nothing.


Method getContent()

Get content.

Usage
RequestResult$getContent()
Returns

The content as a character value or NULL.


Method getRetry()

Get the retry flag.

Usage
RequestResult$getRetry()
Returns

TRUE if the URL request should be sent again, FALSE otherwise.


Method getErrMsg()

Get the error message.

Usage
RequestResult$getErrMsg()
Returns

The error message as a character value or NULL.


Method getStatus()

Get the HTTP status of the response.

Usage
RequestResult$getStatus()
Returns

The status as an integer.


Method getRetryAfter()

Get the time to wait before retrying.

Usage
RequestResult$getRetryAfter()
Returns

The time.


Method getLocation()

Get the redirect location.

Usage
RequestResult$getLocation()
Returns

The redirect location as a character value or NULL.


Method processRequestErrors()

Process possible HTTP error.

Usage
RequestResult$processRequestErrors()
Returns

Nothing.


Method clone()

The objects of this class are cloneable with this method.

Usage
RequestResult$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


pkrog/biodb documentation built on Nov. 29, 2022, 4:24 a.m.