% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/last.R
\name{last_stub}
\alias{last_stub}
\title{Get the last stub created}
\usage{
last_stub()
}
\value{
\code{NULL} if no stubs found; otherwise the last stub created
as a \code{StubbedRequest} class
}
\description{
Get the last stub created
}
\examples{
\dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
# no requests
stub_registry_clear()
last_stub()

# a stub is found
stub_request("head", "https://nytimes.com")
last_stub()

stub_request("post", "https://nytimes.com/stories")
last_stub()

# cleanup
stub_registry_clear()
\dontshow{\}) # examplesIf}
}
