• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

R/H20-Jul-2020-4,6902,492

build/H03-May-2022-

demo/H20-Jul-2020-491277

inst/doc/H20-Jul-2020-1,342867

man/H20-Jul-2020-3,1202,798

tests/H23-Nov-2018-840641

vignettes/H20-Jul-2020-955674

DESCRIPTIONH A D20-Jul-20201.1 KiB3231

LICENSEH A D23-Nov-201853 32

MD5H A D20-Jul-20209.2 KiB180179

NAMESPACEH A D20-Jul-20202.5 KiB120118

NEWS.mdH A D20-Jul-202026.5 KiB710471

README.mdH A D20-Jul-20202.7 KiB5839

README.md

1# httr
2
3<!-- badges: start -->
4[![CRAN status](https://www.r-pkg.org/badges/version/httr)](https://cran.r-project.org/package=httr)
5[![R build status](https://github.com/r-lib/httr/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/httr/actions)
6[![Codecov test coverage](https://codecov.io/gh/r-lib/httr/branch/master/graph/badge.svg)](https://codecov.io/gh/r-lib/httr?branch=master)
7<!-- badges: end -->
8
9The aim of httr is to provide a wrapper for the [curl](https://cran.r-project.org/package=curl) package, customised to the demands of modern web APIs.
10
11Key features:
12
13* Functions for the most important http verbs: `GET()`, `HEAD()`, `PATCH()`,
14  `PUT()`, `DELETE()` and `POST()`.
15
16* Automatic connection sharing across requests to the same website (by
17  default, curl handles are managed automatically), cookies are maintained
18  across requests, and a up-to-date root-level SSL certificate store is used.
19
20* Requests return a standard reponse object that captures the http status line,
21  headers and body, along with other useful information.
22
23  * Response content is available with `content()` as a raw vector (`as =
24    "raw"`), a character vector (`as = "text"`), or parsed into an R object
25    (`as = "parsed"`), currently for html, xml, json, png and jpeg.
26
27  * You can convert http errors into R errors with `stop_for_status()`.
28
29* Config functions make it easier to modify the request in common ways:
30  `set_cookies()`, `add_headers()`, `authenticate()`, `use_proxy()`,
31  `verbose()`, `timeout()`, `content_type()`, `accept()`, `progress()`.
32
33* Support for OAuth 1.0 and 2.0 with `oauth1.0_token()` and `oauth2.0_token()`.
34  The demo directory has eight OAuth demos: four for 1.0 (twitter, vimeo,
35  withings and yahoo) and four for 2.0 (facebook, github, google, linkedin).
36  OAuth credentials are automatically cached within a project.
37
38httr wouldn't be possible without the hard work of the authors of [curl](https://cran.r-project.org/package=curl) and [libcurl](http://curl.haxx.se/). Thanks! httr is inspired by http libraries in other languages, such as [Resty](http://beders.github.com/Resty/Resty/Examples.html), [Requests](https://requests.readthedocs.io/en/master/) and [httparty](http://github.com/jnunemaker/httparty/tree/master).
39
40## Installation
41
42To get the current released version from CRAN:
43
44```R
45install.packages("httr")
46```
47
48To get the current development version from github:
49
50```R
51# install.packages("devtools")
52devtools::install_github("r-lib/httr")
53```
54
55## Code of Conduct
56
57Please note that the httr project is released with a [Contributor Code of Conduct](https://httr.r-lib.org/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
58