Plug
▼
Project version
v1.16.1
v1.16.0
v1.15.3
v1.15.2
v1.15.1
v1.15.0
v1.14.2
v1.14.1
v1.14.0
v1.13.6
v1.13.5
v1.13.4
v1.13.3
v1.13.2
v1.13.1
v1.13.0
v1.12.1
v1.12.0
v1.11.1
v1.11.0
v1.10.4
v1.10.3
v1.10.2
v1.10.1
v1.10.0
v1.9.0
v1.8.3
v1.8.2
v1.8.1
v1.8.0
v1.7.2
v1.7.1
v1.7.0
v1.6.4
v1.6.3
v1.6.2
v1.6.1
v1.6.0
v1.5.1
v1.5.0
v1.5.0-rc.2
v1.5.0-rc.1
v1.5.0-rc.0
v1.4.5
v1.4.4
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.4.0-rc.0
v1.3.6
v1.3.5
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.2.6
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc.0
v1.1.9
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.3
v0.11.1
v0.11.0
v0.10.0
v0.9.0
v0.8.4
v0.8.3
v0.8.2
v0.8.1
Pages
Modules
API Reference
Modules
Plug
Installation
Hello world: request/response
Hello world: websockets
Supervised handlers
Supported Versions
The Plug.Conn struct
Plug.Router
Testing plugs
Available plugs
Helper modules
Contributing
License
Guides
HTTPS
Prerequisites
Getting Started
TLS Protocol Options
HTTP Strict Transport Security (HSTS)
Encrypted Keys
Passing DER Binaries
Custom Diffie-Hellman Parameters
Renewing Certificates
Listening on Port 443
Offloading TLS
Converting Certificates and Keys
Plug
Sections
Types of plugs
Examples
The Plug pipeline
Summary
Types
opts/0
Callbacks
call/2
init/1
Functions
forward/4
run/3
Plug.Builder
Sections
Options
Plug behaviour
Conditional plugs
Overriding the default Plug API functions
Halting a plug pipeline
Summary
Types
plug/0
Functions
builder_opts/0
compile/3
plug/2
Plug.Conn
Sections
Request fields
Fetchable fields
Session vs Assigns
Response fields
Connection fields
Private fields
Custom status codes
Protocol Upgrades
Summary
Types
adapter/0
assigns/0
body/0
cookies/0
halted/0
headers/0
host/0
int_status/0
method/0
owner/0
params/0
port_number/0
query_param/0
query_params/0
query_string/0
req_cookies/0
resp_cookies/0
scheme/0
secret_key_base/0
segments/0
state/0
status/0
t/0
Functions
assign/3
chunk/2
clear_session/1
configure_session/2
delete_req_header/2
delete_resp_cookie/3
delete_resp_header/2
delete_session/2
fetch_cookies/2
fetch_query_params/2
fetch_session/2
get_http_protocol/1
get_peer_data/1
get_req_header/2
get_resp_header/2
get_session/1
get_session/3
halt/1
inform/3
inform!/3
merge_assigns/2
merge_private/2
merge_req_headers/2
merge_resp_headers/2
prepend_req_headers/2
prepend_resp_headers/2
push/3
push!/3
put_private/3
put_req_header/3
put_resp_content_type/3
put_resp_cookie/4
put_resp_header/3
put_session/3
put_status/2
read_body/2
read_part_body/2
read_part_headers/2
register_before_send/2
request_url/1
resp/3
send_chunked/2
send_file/5
send_resp/1
send_resp/3
update_req_header/4
update_resp_header/4
upgrade_adapter/3
Plug.HTML
Summary
Functions
html_escape/1
html_escape_to_iodata/1
Plug.Router
Sections
Routes
Parameter Parsing
Error handling
Passing data between routes and plugs
use options
Telemetry
Summary
Functions
delete/3
forward/2
get/3
head/3
match/3
match_path/1
options/3
patch/3
post/3
put/3
Plug.Test
Summary
Functions
conn/3
delete_req_cookie/2
init_test_session/2
put_http_protocol/2
put_peer_data/2
put_req_cookie/3
recycle_cookies/2
sent_informs/1
sent_pushes/1
sent_resp/1
sent_upgrades/1
Plug.Upload
Sections
Security
Summary
Types
t/0
Functions
child_spec/1
give_away/3
random_file/1
random_file!/1
Plugs
Plug.BasicAuth
Sections
Compile-time usage
Runtime-time usage
Low-level usage
Summary
Functions
basic_auth/2
encode_basic_auth/2
parse_basic_auth/1
request_basic_auth/2
Plug.CSRFProtection
Sections
Token generation
Cross-host protection
Options
Disabling
Examples
Summary
Functions
delete_csrf_token/0
dump_state/0
dump_state_from_session/1
get_csrf_token/0
get_csrf_token_for/1
load_state/2
valid_state_and_csrf_token?/2
Plug.Head
Sections
Examples
Plug.Logger
Sections
Options
Plug.MethodOverride
Sections
Usage
Plug.Parsers
Sections
Options
Examples
Built-in parsers
File handling
Custom body reader
Summary
Callbacks
init/1
parse/5
Plug.RequestId
Sections
Usage
Options
Plug.RewriteOn
Plug.SSL
Sections
x-forwarded-*
Plug Options
Port
Excluded hosts tuple
Summary
Functions
configure/1
Plug.Session
Sections
Session stores
Options
Examples
Plug.Static
Sections
Cache mechanisms
Options
Examples
Plug.Telemetry
Sections
Time unit
Example
Error handling
Plug.Debugger
Sections
Examples
Options
Custom styles
Custom Banners
Links to the text editor
Plug.ErrorHandler
Summary
Callbacks
handle_errors/2
Plug.Exception
Summary
Types
action/0
t/0
Functions
actions/1
status/1
Plug.Conn
Plug.Conn.Adapter
Summary
Types
http_protocol/0
payload/0
peer_data/0
Callbacks
chunk/2
get_http_protocol/1
get_peer_data/1
inform/3
push/3
read_req_body/2
send_chunked/3
send_file/6
send_resp/4
upgrade/3
Functions
conn/5
Plug.Conn.Cookies
Summary
Functions
decode/1
encode/2
Plug.Conn.Query
Summary
Types
decoder/0
Functions
decode/4
decode_done/2
decode_each/2
decode_init/0
decode_pair/2
encode/2
Plug.Conn.Status
Summary
Functions
code/1
reason_atom/1
reason_phrase/1
Plug.Conn.Unfetched
Sections
Examples
Summary
Types
t/0
Functions
fetch/2
get/3
get_and_update/3
pop/2
Plug.Conn.Utils
Summary
Types
params/0
Functions
content_type/1
list/1
media_type/1
params/1
token/1
validate_utf8!/3
Plug.Parsers
Plug.Parsers.JSON
Sections
Options
Plug.Parsers.MULTIPART
Sections
Options
Multipart to params
Dynamic configuration
Plug.Parsers.URLENCODED
Sections
Options
Plug.Session
Plug.Session.COOKIE
Sections
Options
Examples
Plug.Session.ETS
Sections
Options
Storage
Examples
Plug.Session.Store
Summary
Types
cookie/0
session/0
sid/0
Callbacks
delete/3
get/3
init/1
put/4
Functions
get/1
Exceptions
Plug.BadRequestError
Plug.CSRFProtection.InvalidCSRFTokenError
Plug.CSRFProtection.InvalidCrossOriginRequestError
Plug.Conn.AlreadySentError
Plug.Conn.CookieOverflowError
Plug.Conn.InvalidHeaderError
Plug.Conn.InvalidQueryError
Plug.Conn.NotSentError
Plug.Conn.WrapperError
Summary
Functions
message/1
reraise/1
reraise/3
reraise/4
Plug.Parsers.BadEncodingError
Plug.Parsers.ParseError
Summary
Functions
message/1
Plug.Parsers.RequestTooLargeError
Plug.Parsers.UnsupportedMediaTypeError
Summary
Functions
message/1
Plug.Router.InvalidSpecError
Plug.Router.MalformedURIError
Plug.Static.InvalidPathError
Plug.TimeoutError
Plug.UploadError
Search documentation of Plug
Settings
View Source
Plug.Router.InvalidSpecError
exception
(Plug v1.16.0)
×