# Plug v1.20.1 - Table of Contents

> Compose web applications with functions

## Pages

- [Changelog](changelog.md)
- [Plug](readme.md)

- Guides
  - [HTTPS](https.md)

## Modules

- [Plug](Plug.md): The plug specification.
- [Plug.Builder](Plug.Builder.md): Conveniences for building plugs.
- [Plug.Conn](Plug.Conn.md): The Plug connection.
- [Plug.HTML](Plug.HTML.md): Conveniences for generating HTML.

- [Plug.Router](Plug.Router.md): A DSL to define a routing algorithm that works with Plug.
- [Plug.Test](Plug.Test.md): Conveniences for testing plugs.
- [Plug.Upload](Plug.Upload.md): A server (a `GenServer` specifically) that manages uploaded files.

- Plugs
  - [Plug.BasicAuth](Plug.BasicAuth.md): Functionality for providing Basic HTTP authentication.
  - [Plug.CSRFProtection](Plug.CSRFProtection.md): Plug to protect from cross-site request forgery.
  - [Plug.Head](Plug.Head.md): A Plug to convert `HEAD` requests to `GET` requests.
  - [Plug.Logger](Plug.Logger.md): A plug for logging basic request information in the format
  - [Plug.MethodOverride](Plug.MethodOverride.md): This plug overrides the request's `POST` method with the method defined in
the `_method` request parameter.
  - [Plug.Parsers](Plug.Parsers.md): A plug for parsing the request body.
  - [Plug.RequestId](Plug.RequestId.md): A plug for generating a unique request ID for each request.
  - [Plug.RewriteOn](Plug.RewriteOn.md): A plug to rewrite the request's host/port/protocol from `x-forwarded-*` headers.
  - [Plug.SSL](Plug.SSL.md): A plug to force SSL connections and enable HSTS.
  - [Plug.Session](Plug.Session.md): A plug to handle session cookies and session stores.
  - [Plug.Static](Plug.Static.md): A plug for serving static assets.
  - [Plug.Telemetry](Plug.Telemetry.md): A plug to instrument the pipeline with `:telemetry` events.

- Error handling
  - [Plug.Debugger](Plug.Debugger.md): A module (**not a plug**) for debugging in development.
  - [Plug.ErrorHandler](Plug.ErrorHandler.md): A module to be used in your existing plugs in order to provide
error handling.
  - [Plug.Exception](Plug.Exception.md): A protocol that extends exceptions to be status-code aware.

- Plug.Conn
  - [Plug.Conn.Adapter](Plug.Conn.Adapter.md): Specification of the connection adapter API implemented by webservers.
  - [Plug.Conn.Cookies](Plug.Conn.Cookies.md): Conveniences for encoding and decoding cookies.

  - [Plug.Conn.Query](Plug.Conn.Query.md): Conveniences for decoding and encoding URL-encoded queries.
  - [Plug.Conn.Status](Plug.Conn.Status.md): Conveniences for working with status codes.

  - [Plug.Conn.Unfetched](Plug.Conn.Unfetched.md): A struct used as default on unfetched fields.
  - [Plug.Conn.Utils](Plug.Conn.Utils.md): Utilities for working with connection data

- Plug.Parsers
  - [Plug.Parsers.JSON](Plug.Parsers.JSON.md): Parses JSON request body.
  - [Plug.Parsers.MULTIPART](Plug.Parsers.MULTIPART.md): Parses multipart request body.
  - [Plug.Parsers.URLENCODED](Plug.Parsers.URLENCODED.md): Parses urlencoded request body.

- Plug.Session
  - [Plug.Session.COOKIE](Plug.Session.COOKIE.md): Stores the session in a cookie.
  - [Plug.Session.ETS](Plug.Session.ETS.md): Stores the session in an in-memory ETS table.
  - [Plug.Session.Store](Plug.Session.Store.md): Specification for session stores.

- Exceptions
  - [Plug.BadRequestError](Plug.BadRequestError.md): The request will not be processed due to a client error.

  - [Plug.CSRFProtection.InvalidCSRFTokenError](Plug.CSRFProtection.InvalidCSRFTokenError.md): Error raised when CSRF token is invalid.
  - [Plug.CSRFProtection.InvalidCrossOriginRequestError](Plug.CSRFProtection.InvalidCrossOriginRequestError.md): Error raised when non-XHR requests are used for Javascript responses.
  - [Plug.Conn.AlreadySentError](Plug.Conn.AlreadySentError.md): Error raised when trying to modify or send an already sent response

  - [Plug.Conn.CookieOverflowError](Plug.Conn.CookieOverflowError.md): Error raised when the cookie exceeds the maximum size of 4096 bytes.

  - [Plug.Conn.InvalidHeaderError](Plug.Conn.InvalidHeaderError.md): Error raised when trying to send a header that has errors, for example
  - [Plug.Conn.InvalidQueryError](Plug.Conn.InvalidQueryError.md): Raised when the request string is malformed, for example
  - [Plug.Conn.NotSentError](Plug.Conn.NotSentError.md): Error raised when no response is sent in a request

  - [Plug.Conn.WrapperError](Plug.Conn.WrapperError.md): Wraps the connection in an error which is meant
to be handled upper in the stack.
  - [Plug.Parsers.BadEncodingError](Plug.Parsers.BadEncodingError.md): Raised when the request body contains bad encoding.

  - [Plug.Parsers.ParseError](Plug.Parsers.ParseError.md): Error raised when the request body is malformed.

  - [Plug.Parsers.RequestTooLargeError](Plug.Parsers.RequestTooLargeError.md): Error raised when the request is too large.

  - [Plug.Parsers.UnsupportedMediaTypeError](Plug.Parsers.UnsupportedMediaTypeError.md): Error raised when the request body cannot be parsed.

  - [Plug.Router.InvalidSpecError](Plug.Router.InvalidSpecError.md)
  - [Plug.Router.MalformedURIError](Plug.Router.MalformedURIError.md)
  - [Plug.Static.InvalidPathError](Plug.Static.InvalidPathError.md)
  - [Plug.TimeoutError](Plug.TimeoutError.md): Timeout while waiting for the request.

  - [Plug.UploadError](Plug.UploadError.md)

