ping: Ping a url, doing a single call, with any http verbs

Description Usage Arguments Examples

View source: R/ping.R

Description

Ping a url, doing a single call, with any http verbs

Usage

1
ping(url, verb = GET, ...)

Arguments

url

A url

verb

(character) An http verb, default: GET

...

Any httr verb parameters passed on to those functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
"http://httpbin.org/get" %>% ping()
ping("http://httpbin.org/get")
"http://httpbin.org/get" %>% ping(config=verbose())
ping("http://httpbin.org/get", config=verbose())
"http://httpbin.org/get" %>% ping(config=c(verbose(), accept_json()))

"http://httpbin.org/get" %>% ping()
"http://httpbin.org/get" %>% ping(verb=HEAD)
"http://httpbin.org/get" %>% ping(verb=PUT)
"http://google.com" %>% ping()

# pass just a port number, tries to resolve, fails if not found
# "9200" %>% ping()
# 9200 %>% ping()
# 9200 %>% ping(verb=POST)
# 9200 %>% ping(verb=HEAD)
# ping(9200)
# ping("9200")

## End(Not run)

httping documentation built on May 29, 2017, 10:50 p.m.