determine_method: Determine the correct HTTP method to use for a given API...

Description Usage Arguments Examples

View source: R/send.R

Description

If multiple methods are available (e.g., GET and DELETE), a warning will be issued and only the first method will be used. If no methods are available, it is probably an invalid API route. In this case, a warning will be issued and GET will be used.

Usage

1

Arguments

url

character. The HTTP URL.

Examples

1
2
3
stopifnot(hipchat:::determine_method('nonexistent') == 'GET') # Warns about no method
stopifnot(hipchat:::determine_method('room') == 'GET') # Warns about multiple methods
stopifnot(hipchat:::determine_method('user/some@guy.com/message') == 'POST') # No warning

robertzk/hipchat documentation built on May 27, 2019, 10:34 a.m.