Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hrbrmstr/hdrs

Have Some Fun with 'HTTP' Headers
https://github.com/hrbrmstr/hdrs

http http-headers r rstats

Last synced: 2 months ago
JSON representation

Have Some Fun with 'HTTP' Headers

Awesome Lists containing this project

README

        

---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
knitr::opts_chunk$set(collapse=TRUE, fig.retina=2, message=FALSE, warning=FALSE)
options(width=120)
```

[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/hdrs.svg?branch=master)](https://travis-ci.org/hrbrmstr/hdrs)
[![Coverage Status](https://codecov.io/gh/hrbrmstr/hdrs/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/hdrs)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/hdrs)](https://cran.r-project.org/package=hdrs)

# hdrs

Have Some Fun with 'HTTP' Headers

## Description

Methods are provided to retrieve and test 'HTTP' headers from
a website. An 'HTTP' request and response header reference/explanatory
data frame is also provided via the 'hsecsecan' project
()

## What's Inside The Tin

The following functions are implemented:

- `as.data.frame.insensitive`: Turn `httr::headers()` objects into a data frame
- `assess_security_headers`: Assess "security" headers for a given URL
- `explain_headers`: Explain HTTP headers found from a URL request
- `explore_app`: A Shiny App for Exploring HTTP Headers
- `http_headers`: HTTP Header Reference

## Installation

```{r install-ex, eval=FALSE}
install.packages("hdrs", repos = "https://cinc.rud.is/")
```

## Usage

```{r lib-ex}
library(hdrs)
library(tibble) # for printing

# current version
packageVersion("hdrs")

```

```{r df}
httr::HEAD("https://rud.is/b") %>%
httr::headers() %>%
as.data.frame()
```

```{r basic}
assess_security_headers("https://cran.r-project.org") %>%
dplyr::select(-url) %>%
gt::gt()
```

Tsk, tsk…

```{r someworktodo}
assess_security_headers("https://rud.is/b") %>%
dplyr::select(-url) %>%
gt::gt()
```

Looks like I gots some 'splainin to do as well.

```{r all}
hdrs::explain_headers("https://community.rstudio.com/") %>%
dplyr::select(header,value, enable, security_reference, recommendations) %>%
gt::gt()
```

### Reference

```{r ref}
data(http_headers)

dplyr::glimpse(http_headers)
```

## hdrs Metrics

```{r cloc, echo=FALSE}
cloc::cloc_pkg_md()
```

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
By participating in this project you agree to abide by its terms.