ndex_helper_httpResponseHandler {ndexr}R Documentation

Handles the http server response

Description

This function handles the response from a server. If some response code different from success (200) is returned, the execution stops and the reason is shown.

Usage

ndex_helper_httpResponseHandler(response, description, verbose = FALSE)

Arguments

response

object of class response (httr)

description

character; description of the action performed

verbose

logical; whether to print out extended feedback

Value

returns the given respons, if it doesn't contain any HTTP error

Note

This function is internal.

Examples

ndexr:::ndex_helper_httpResponseHandler(httr::GET('http://www.ndexbio.org'), 
                                        'Tried to connect to NDEx server', TRUE)

[Package ndexr version 1.10.0 Index]