Commit ac4072ca authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

add status function and gather some functions

parent f03b8fdd
......@@ -7,4 +7,5 @@ export(endpoints_alapu)
export(endpoints_package)
export(endpoints_session)
export(resp_content)
export(resp_status)
export(session_key)
#' session_key
#' session_key
#' @param x alpu_post_res object
#' @keywords alapu
#' @export
#' @examples
#' \dontrun{
#' session_key()
#' }
session_key <- function(x){
res <- httr::headers(x)$`x-ocpu-session`
return(res)
}
#' resp_content
#' resp_content
......@@ -16,3 +18,33 @@ resp_content <- function(x,as = NULL, type = NULL, encoding = NULL, ...){
res <- httr::content(x,as = as, type = type, encoding = encoding, ...)
return(res)
}
#' session_key
#' session_key
#' @param x alpu_post_res object
#' @keywords alapu
#' @export
#' @examples
#' \dontrun{
#' session_key()
#' }
session_key <- function(x){
res <- httr::headers(x)$`x-ocpu-session`
return(res)
}
#' resp_status
#' resp_status
#' @param x alpu_post_res object
#' @keywords alapu
#' @export
#' @examples
#' \dontrun{
#' resp_status()
#' }
resp_status <- function(x){
res <- x$status_code
return(res)
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/resp_content.R
% Please edit documentation in R/utils.R
\name{resp_content}
\alias{resp_content}
\title{resp_content
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{resp_status}
\alias{resp_status}
\title{resp_status
resp_status}
\usage{
resp_status(x)
}
\arguments{
\item{x}{alpu_post_res object}
}
\description{
resp_status
resp_status
}
\examples{
\dontrun{
resp_status()
}
}
\keyword{alapu}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/session_key.R
% Please edit documentation in R/utils.R
\name{session_key}
\alias{session_key}
\title{session_key
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment