nri-observability-0.1.0.2: Report log spans collected by nri-prelude.
Safe HaskellNone
LanguageHaskell2010

Log.HttpRequest

Description

A module for creating great logs in code that send or receive HTTP requests.

Synopsis

Documentation

data Details Source #

A type describing an http request.

emptyDetails
  { method = Just "GET"
  , host = Just "https://noredink.com"
  }

Instances

Instances details
Generic Details Source # 
Instance details

Defined in Log.HttpRequest

Associated Types

type Rep Details :: Type -> Type #

Methods

from :: Details -> Rep Details x #

to :: Rep Details x -> Details #

ToJSON Details Source # 
Instance details

Defined in Log.HttpRequest

type Rep Details Source # 
Instance details

Defined in Log.HttpRequest

emptyDetails :: Details Source #

An empty details value to be modified by you.

method :: Details -> Maybe Text Source #

The method of the http request.

host :: Details -> Maybe Text Source #

The host the http request is made to.

path :: Details -> Maybe Text Source #

The path portion of the request URI.

queryString :: Details -> Maybe Text Source #

The query string portion of the request URI.

headers :: Details -> Dict Text Text Source #

The headers on the request. Do not pass headers with sensitive information in there, filter them out first!

httpVersion :: Details -> Maybe Text Source #

The version of the http protocol used.

endpoint :: Details -> Maybe Text Source #

The endpoint called. This is like the path, but with the dynamic parts of the path replaced with arguments.

For example: > path teethupperleft/12 > endpoint teeth:quadrant/:number

status :: Details -> Maybe Int Source #

The response status of the request.