R/content.R

Defines functions content_protobuf content_tsv content_csv content_json content_plain content_html

Documented in content_csv content_html content_json content_plain content_protobuf content_tsv

#' Content Headers
#' 
#' Convenient functions for more readable content type headers.
#' 
#' @examples 
#' list(
#'  "Content-Type",
#'  content_json()
#' )
#' 
#' if(FALSE)
#'  req$header(
#'   "Content-Type",
#'   content_json()
#'  )
#' 
#' @name content
#' 
#' @export 
content_html <- function() {
  "text/html"
}

#' @rdname content
#' @export 
content_plain <- function() {
  "text/plain"
}

#' @rdname content
#' @export 
content_json <- function() {
  "application/json"
}

#' @rdname content
#' @export 
content_csv <- function() {
  "text/csv"
}

#' @rdname content
#' @export 
content_tsv <- function() {
  "tab-separated-values"
}

#' @rdname content
#' @export 
content_protobuf <- function() {
  "application/x-protobuf"
}
devOpifex/ambiorix documentation built on Oct. 15, 2024, 10:21 p.m.