ndex_helper_httpResponseHandler: Handles the http server response

View source: R/ndex_helper.r

ndex_helper_httpResponseHandlerR 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)

frankkramer-lab/ndexr documentation built on April 4, 2023, 7:19 p.m.