io.pedestal libraries 0.7.0
Namespaces
io.pedestal.environment
Information about the running environment for the Pedestal application.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal libraries 0.7.1
Namespaces
io.pedestal.environment
Information about the running environment for the Pedestal application.
Public variables and functions:
io.pedestal.http
This namespace ties together the many other namespaces to make it possible to succinctly define a service and start and stop a server for that service.
Public variables and functions:
- create-provider
- create-server
- create-servlet
- default-debug-observer-omit
- default-interceptors
- dev-interceptors
- edn-response
- enable-debug-interceptor-observer
- html-body
- interceptor-chain-provider
- json-body
- json-print
- json-response
- log-request
- not-found
- respond-with
- response?
- server
- service-fn
- servlet
- servlet-destroy
- servlet-init
- servlet-service
- start
- stop
- transit-body
- transit-body-interceptor
- transit-json-body
- transit-msgpack-body
io.pedestal.http.body-params
Provides interceptors and support for parsing the body of a request, generally according to the content type header. This results in new keys on the request map, depending on the type of data parsed.
Public variables and functions:
io.pedestal.http.container
Deeper Pedestal<->Container integration and cooperation for HTTP handling
diff --git a/api/0.7/io.pedestal.environment.html b/api/0.7/io.pedestal.environment.html index 67cd921..dabb0df 100644 --- a/api/0.7/io.pedestal.environment.html +++ b/api/0.7/io.pedestal.environment.html @@ -1,6 +1,6 @@ -Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.environment
added in 0.7.0
Information about the running environment for the Pedestal application.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.environment
added in 0.7.0
Information about the running environment for the Pedestal application.
dev-mode?
Set to the boolean value of the system property io.pedestal.dev-mode
.
Development mode exists to assist in setting up a useful REPL-oriented workflow for local development and testing. It should never be enabled in production.
-Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.body-params
Provides interceptors and support for parsing the body of a request, generally according to the content type header. This results in new keys on the request map, depending on the type of data parsed.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.body-params
Provides interceptors and support for parsing the body of a request, generally according to the content type header. This results in new keys on the request map, depending on the type of data parsed.
add-parser
(add-parser parser-map content-type parser-fn)
Adds a parser to the parser map; content type can either be a string (to exactly match the content type), or a regular expression.
The parser-fn is passed the request map and returns a modified request map with an appropriate key and parsed value. For example, the default JSON parser adds a :json-params key.
-add-ring-middleware
deprecated in 0.7.0
(add-ring-middleware parser-map content-type middleware)
body-params
(body-params)
(body-params parser-map)
Returns an interceptor that will parse the body of the request according to the content type. The normal rules are provided by default-parser-map which maps a regular expression identifying a content type to a parsing function for that type.
+add-ring-middleware
deprecated in 0.7.0
(add-ring-middleware parser-map content-type middleware)
body-params
(body-params)
(body-params parser-map)
Returns an interceptor that will parse the body of the request according to the content type. The normal rules are provided by default-parser-map which maps a regular expression identifying a content type to a parsing function for that type.
Parameters parsed from the body are added as a new key to the request map dependending on which parser does the work; for the default parsers, one of the following will be used:
- :json-params @@ -11,20 +11,20 @@
- :form-params
- :transit-params
custom-edn-parser
(custom-edn-parser & options)
Return an edn-parser fn that, given a request, will read the body of that request with edn/read
. options are key-val pairs that will be passed as a hash-map to edn/read
.
custom-json-parser
(custom-json-parser & options)
Return a json-parser fn that, given a request, will read the body of the request with json/parse-stream
. options are key-val pairs that will be passed along to json/parse-stream
.
custom-transit-parser
(custom-transit-parser & options)
Return a transit-parser fn that, given a request, will read the body of that request with transit/read
. options is a sequence to pass to transit/reader along with the body of the request.
default-parser-map
(default-parser-map & parser-options)
Return a map of MIME-type to parsers. Included types are edn, json and form-encoding. parser-options are key-val pairs, valid options are:
+custom-edn-parser
(custom-edn-parser & options)
Return an edn-parser fn that, given a request, will read the body of that request with edn/read
. options are key-val pairs that will be passed as a hash-map to edn/read
.
custom-json-parser
(custom-json-parser & options)
Return a json-parser fn that, given a request, will read the body of the request with json/parse-stream
. options are key-val pairs that will be passed along to json/parse-stream
.
custom-transit-parser
(custom-transit-parser & options)
Return a transit-parser fn that, given a request, will read the body of that request with transit/read
. options is a sequence to pass to transit/reader along with the body of the request.
default-parser-map
(default-parser-map & parser-options)
Return a map of MIME-type to parsers. Included types are edn, json and form-encoding. parser-options are key-val pairs, valid options are:
:edn-options A hash-map of options to be used when invoking edn/read
. :json-options A hash-map of options to be used when invoking json/parse-stream
. :transit-options A vector of options to be used when invoking transit/reader
- must apply to both json and msgpack
Examples:
(default-parser-map :json-options {:key-fn keyword}) ;; This parser-map would parse the json body ‘{“foo”: “bar”}’ as ;; {:foo “bar”}
(default-parser-map :edn-options {:readers data-readers}) ;; This parser-map will parse edn bodies using any custom edn readers you ;; define (in a data_readers.clj file, for example.)
(default-parser-map :transit-options {:handlers {“custom/model” custom-model-read-handler}}) ;; This parser-map will parse the transit body using a handler defined by ;; custom-model-read-handler.
-edn-parser
deprecated in 0.7.0
(edn-parser & args)
Take a request and parse its body as edn.
+edn-parser
deprecated in 0.7.0
(edn-parser & args)
Take a request and parse its body as edn.
Invoke custom-edn-parser instead.
-json-parser
deprecated in 0.7.0
(json-parser & args)
Take a request and parse its body as JSON.
+json-parser
deprecated in 0.7.0
(json-parser & args)
Take a request and parse its body as JSON.
Use custom-json-parser instead.
-transit-parser
deprecated in 0.7.0
(transit-parser & args)
Take a request and parse its body as JSON transit.
+transit-parser
deprecated in 0.7.0
(transit-parser & args)
Take a request and parse its body as JSON transit.
Use custom-transit-parser instead.
-Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.container
Deeper Pedestal<->Container integration and cooperation for HTTP handling
-WriteNIOByteBody
protocol
members
write-byte-buffer-body
(write-byte-buffer-body servlet-response body resume-chan context)
write-byte-channel-body
(write-byte-channel-body servlet-response body resume-chan context)
Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.container
Deeper Pedestal<->Container integration and cooperation for HTTP handling
+WriteNIOByteBody
protocol
members
write-byte-buffer-body
(write-byte-buffer-body servlet-response body resume-chan context)
write-byte-channel-body
(write-byte-channel-body servlet-response body resume-chan context)
Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.content-negotiation
negotiate-content
(negotiate-content supported-type-strs)
(negotiate-content supported-type-strs opts-map)
Given a vector of strings (supported types mime-types) and optionally a map of additional options, return an interceptor that will parse client-request response formats, and add an :accept
key on the request, of the most acceptable response format.
Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.content-negotiation
negotiate-content
(negotiate-content supported-type-strs)
(negotiate-content supported-type-strs opts-map)
Given a vector of strings (supported types mime-types) and optionally a map of additional options, return an interceptor that will parse client-request response formats, and add an :accept
key on the request, of the most acceptable response format.
The format of the :accept
value is a map containing keys :field, :type, and :subtype - all strings
Additional options:
- :no-match-fn - A function that takes a context; Called when no acceptable format/mime-type is found
- :content-param-paths - a vector of vectors; paths into the context to find ‘accept’ format strings
Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.cors
allow-origin
(allow-origin allowed-origins)
Returns a CORS interceptor that allows calls from the specified allowed-origins
, which is one of the following:
Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.cors
allow-origin
(allow-origin allowed-origins)
Returns a CORS interceptor that allows calls from the specified allowed-origins
, which is one of the following:
- a sequence of strings
- a function of one argument that returns a truthy value when an origin is allowed @@ -13,6 +13,6 @@
- :max-age - a long, indicates the number of seconds a client should cache the response from a preflight request
- :methods - a string, indicates the accepted HTTP methods. Defaults to “GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS”
dev-allow-origin
An interceptor that provides a default origin header as a blank string, if not supplied in the incoming request.
+dev-allow-origin
An interceptor that provides a default origin header as a blank string, if not supplied in the incoming request.
This is used in development, and added by default by the dev-interceptors function.
-Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.csrf
CSRF protection interceptor support, compatible with ring-anti-forgery
-anti-forgery
(anti-forgery)
(anti-forgery options)
Interceptor that prevents CSRF attacks. Any POST/PUT/PATCH/DELETE request to the handler returned by this function must contain a valid anti-forgery token, or else an access-denied response is returned.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.csrf
CSRF protection interceptor support, compatible with ring-anti-forgery
+anti-forgery
(anti-forgery)
(anti-forgery options)
Interceptor that prevents CSRF attacks. Any POST/PUT/PATCH/DELETE request to the handler returned by this function must contain a valid anti-forgery token, or else an access-denied response is returned.
The anti-forgery token can be placed into a HTML page via the ::anti-forgery-token within the request, which is bound to a random key unique to the current session. By default, the token is expected to be in a form field named ‘__anti-forgery-token’, or in the ‘X-CSRF-Token’ or ‘X-XSRF-Token’ headers.
This behavior can be customized by supplying a map of options: :read-token a function that takes a request and returns an anti-forgery token, or nil if the token does not exist. :cookie-token a truthy value, if you want a CSRF double-submit cookie set :error-response the response to return if the anti-forgery token is incorrect or missing. :error-handler a handler function (passed the context) to call if the anti-forgery token is incorrect or missing (intended to return a valid response). :body-params a body-params parser map to use; If none is supplied, the default parsers will be used (standard body-params behavior) :cookie-attrs a map of attributes to associate with the csrf cookie.
Only one of :error-response, :error-handler may be specified.
-Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http
This namespace ties together the many other namespaces to make it possible to succinctly define a service and start and stop a server for that service.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http
This namespace ties together the many other namespaces to make it possible to succinctly define a service and start and stop a server for that service.
This namespace is generic as to the underlying container for the server; in some cases, a namespace will be loaded on the fly to convert a service to a server (based on Jetty or Tomcat, or others).
In addition, there is support here for deploying a Pedestal application as part of a WAR file, via the ClojureVarServlet.
create-provider
(create-provider service-map)
Applies default-interceptors (if not already applied) and creates the interceptor chain provider (the basis for starting an embedded servlet container).
-create-server
(create-server service-map)
(create-server service-map init-fn)
Given a service map, creates and returns an initialized server map which is ready to be started via start. If init-fn, a zero arg function, is provided, it is invoked first.
+create-server
(create-server service-map)
(create-server service-map init-fn)
Given a service map, creates and returns an initialized server map which is ready to be started via start. If init-fn, a zero arg function, is provided, it is invoked first.
Creating a server does not start the server; that occurs when the returned map is passed to start.
Notes: - If the service map option :io.pedestal.http/chain-provider
is present, it is used to create the server, otherwise a servlet provider will be used. In this case, the type of servlet container created is determined by the :io.pedestal.http/type
option. - For servlet containers, the resulting service-map will contain the io.pedestal.http/service-fn
key which is useful for testing the service without starting it.
create-servlet
(create-servlet service-map)
Creates a servlet given an options map with keyword keys prefixed by namespace e.g. :io.pedestal.http/interceptors or ::bootstrap/interceptors if the namespace is aliased to bootstrap.
+create-servlet
(create-servlet service-map)
Creates a servlet given an options map with keyword keys prefixed by namespace e.g. :io.pedestal.http/interceptors or ::bootstrap/interceptors if the namespace is aliased to bootstrap.
Options:
- :io.pedestal.http/interceptors: A vector of interceptors that defines a service.
Note: Additional options are passed to default-interceptors if :interceptors is not set.
-default-debug-observer-omit
added in 0.7.0
(default-debug-observer-omit key-path)
Default for key paths to ignore when using debug-observer. This is primarily the request and response bodies, anything private to the io.pedestal.interceptor.chain namespaces, and a few routing-related keys (that produce non-useful logged output).
-default-interceptors
(default-interceptors service-map)
Builds a default vector of interceptors given a service map with keyword keys prefixed by namespace e.g. :io.pedestal.http/routes (or ::http/routes if the namespace is aliased to http
); the interceptor are added to the ::interceptors key.
default-debug-observer-omit
added in 0.7.0
(default-debug-observer-omit key-path)
Default for key paths to ignore when using debug-observer. This is primarily the request and response bodies, anything private to the io.pedestal.interceptor.chain namespaces, and a few routing-related keys (that produce non-useful logged output).
+default-interceptors
(default-interceptors service-map)
Builds a default vector of interceptors given a service map with keyword keys prefixed by namespace e.g. :io.pedestal.http/routes (or ::http/routes if the namespace is aliased to http
); the interceptor are added to the ::interceptors key.
This function is called from create-servlet and create-provider.
When the ::interceptors key is already present in the context, this function does nothing. This allows application code to invoke default-interceptors, and then add or modify those interceptors before continuing on towards creating and starting a server.
Options:
@@ -35,39 +35,39 @@Note that none of the default interceptors will parse the content of the request body (for POST or other requests); individual routes that are of type POST should include the body-params interceptor to do so.
-dev-interceptors
(dev-interceptors service-map)
Add dev-allow-origin and exception-debug interceptors to facilitate local development.
+dev-interceptors
(dev-interceptors service-map)
Add dev-allow-origin and exception-debug interceptors to facilitate local development.
This should normally be invoked after default-interceptors.
-edn-response
(edn-response obj)
Return a Ring response that will print the given obj
to the HTTP output stream in EDN format.
enable-debug-interceptor-observer
added in 0.7.0
(enable-debug-interceptor-observer service-map)
(enable-debug-interceptor-observer service-map debug-observer-options)
Enables debug-observer for all request executions. By default, uses default-debug-observer-omit to omit internal or overly verbose context map keys.
+edn-response
(edn-response obj)
Return a Ring response that will print the given obj
to the HTTP output stream in EDN format.
enable-debug-interceptor-observer
added in 0.7.0
(enable-debug-interceptor-observer service-map)
(enable-debug-interceptor-observer service-map debug-observer-options)
Enables debug-observer for all request executions. By default, uses default-debug-observer-omit to omit internal or overly verbose context map keys.
The debug observer should not be enabled in production: it is somewhat expensive to identify changes to the context, and some data in the context that might be logged can be verbose, sensitive, or both.
This modifies the ::initial-context key of the service map.
-html-body
Set the Content-Type header to “text/html” if the body is a string and a type has not been set.
-interceptor-chain-provider
(interceptor-chain-provider service-map)
Called from create-provider, uses the ::chain-provider or ::type key of the service map to create the chain provider.
-json-body
Set the Content-Type header to “application/json” and convert the body to JSON if the body is a collection and a type has not been set.
-json-response
(json-response obj)
Return a Ring response that will print the given obj
to the HTTP output stream in JSON format.
respond-with
added in 0.7.0
(respond-with context status)
(respond-with context status body)
(respond-with context status headers body)
Utility function to add a :response map to the interceptor context.
-response?
(response? resp)
A valid response is any map that includes an integer :status value.
-html-body
Set the Content-Type header to “text/html” if the body is a string and a type has not been set.
+interceptor-chain-provider
(interceptor-chain-provider service-map)
Called from create-provider, uses the ::chain-provider or ::type key of the service map to create the chain provider.
+json-body
Set the Content-Type header to “application/json” and convert the body to JSON if the body is a collection and a type has not been set.
+json-response
(json-response obj)
Return a Ring response that will print the given obj
to the HTTP output stream in JSON format.
respond-with
added in 0.7.0
(respond-with context status)
(respond-with context status body)
(respond-with context status headers body)
Utility function to add a :response map to the interceptor context.
+response?
(response? resp)
A valid response is any map that includes an integer :status value.
+server
(server service-map)
Converts a service map to a server map.
A service map is largely configuration, including some special callbacks; most of the keys are namespaced. Some keys are applicable to any underlying implementation (such as Jetty or Tomcat), and some are specific to the particular implementation.
This function uses the ::type key to link the service map to a specific implementation; this should be a function that accepts a service map and returns a server map of an unstarted server.
::type can also be a keyword; this keyword is used to build a fully qualified symbol to resolve the function. For example, :jetty
will be expanded into io.pedestal.http.jetty/service
(but this approach is not favored as it can prevent AOT compilation from pre-compiling the indirectly referenced namespace).
The function is passed the service map and options; these options are a subset of the keys from the service map (::host, ::port, ::join?, ::container-options, and ::websockets); they are extracted from the service map and passed as the options map, after stripping out the namespaces (::host becomes :host).
Returns a server map, which merges the provided service map with additional keys from the map returned by the server-fn. The server map may be passed to start and stop.
A typical embedded app will call create-server, rather than calling this function directly.
-service-fn
(service-fn {:io.pedestal.http/keys [interceptors initial-context service-fn-options], :as service-map})
Converts the interceptors for the service into a service function, which is a function that accepts a servlet, servlet request, and servlet response, and initiates the interceptor chain.
-servlet
(servlet {service-fn :io.pedestal.http/service-fn, :as service-map})
Converts the service-fn in the service map to a servlet instance.
-start
(start server-map)
Given a server map, as returned by server (usually via create-server), starts the server. The server may later be stopped via stop.
+service-fn
(service-fn {:io.pedestal.http/keys [interceptors initial-context service-fn-options], :as service-map})
Converts the interceptors for the service into a service function, which is a function that accepts a servlet, servlet request, and servlet response, and initiates the interceptor chain.
+servlet
(servlet {service-fn :io.pedestal.http/service-fn, :as service-map})
Converts the service-fn in the service map to a servlet instance.
+start
(start server-map)
Given a server map, as returned by server (usually via create-server), starts the server. The server may later be stopped via stop.
Note that if the ::join? option is true, then this function will block until the started server stops.
Returns the server map unchanged.
-stop
(stop server-map)
Given a server map (started by start), stops the server, if running.
Returns the server map unchanged.
-transit-body
Same as transit-json-body
– Set the Content-Type header to “application/transit+json” and convert the body to transit+json if the body is a collection and a type has not been set.
transit-body-interceptor
(transit-body-interceptor iname default-content-type transit-format)
(transit-body-interceptor iname default-content-type transit-format transit-opts)
Returns an interceptor which sets the Content-Type header to the appropriate value depending on the transit format. Converts the body to the specified Transit format if the body is a collection and a type has not been set. Optionally accepts transit-opts which are handed to trasit/writer and may contain custom write handlers.
+transit-body
Same as transit-json-body
– Set the Content-Type header to “application/transit+json” and convert the body to transit+json if the body is a collection and a type has not been set.
transit-body-interceptor
(transit-body-interceptor iname default-content-type transit-format)
(transit-body-interceptor iname default-content-type transit-format transit-opts)
Returns an interceptor which sets the Content-Type header to the appropriate value depending on the transit format. Converts the body to the specified Transit format if the body is a collection and a type has not been set. Optionally accepts transit-opts which are handed to trasit/writer and may contain custom write handlers.
Expects the following arguments:
iname - namespaced keyword for the interceptor name default-content-type - content-type string to set in the response transit-format - either :json or :msgpack transit-options - optional. map of options for transit/writer
-transit-json-body
Set the Content-Type header to “application/transit+json” and convert the body to transit+json if the body is a collection and a type has not been set.
-transit-msgpack-body
Set the Content-Type header to “application/transit+msgpack” and convert the body to transit+msgpack if the body is a collection and a type has not been set.
-transit-json-body
Set the Content-Type header to “application/transit+json” and convert the body to transit+json if the body is a collection and a type has not been set.
+transit-msgpack-body
Set the Content-Type header to “application/transit+msgpack” and convert the body to transit+msgpack if the body is a collection and a type has not been set.
+Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.impl.servlet-interceptor
Interceptors for adapting the Java HTTP Servlet interfaces.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.impl.servlet-interceptor
Interceptors for adapting the Java HTTP Servlet interfaces.
default-exception-analyzer
added in 0.7.0
(default-exception-analyzer _context exception)
The default for the :exception-analyzer option, this function is passed the context and a thrown exception that bubbled up to the stylobate interceptor.
Primarily, this function determines if an exception should be logged or not; it can also log or otherwise report an exception itself, and then prevent the stylobate interceptor from reporting the exception, by returning nil.
If a non-nil value is returned, it must be an exception, which will be logged.
This implementation returns the exception, unless it represents a broken pipe (a common exception that occurs when, during a long response, the client terminates the socket connection).
-exception-debug
An interceptor which catches errors, renders them to readable text and sends them to the user. This interceptor is intended for development time assistance in debugging problems in pedestal services. Including it in interceptor paths on production systems may present a security risk by exposing call stacks of the application when exceptions are encountered.
-http-interceptor-service-fn
(http-interceptor-service-fn interceptors)
(http-interceptor-service-fn interceptors default-context)
(http-interceptor-service-fn interceptors default-context options)
Returns a function which can be used as an implementation of the Servlet.service method. It executes the interceptors (which must be already converted into Interceptor records) on an initial context map containing :servlet, :servlet-config, :servlet-request, and :servlet-response. The stylobate and ring-response interceptors are prepended to the sequence of interceptors.
+exception-debug
An interceptor which catches errors, renders them to readable text and sends them to the user. This interceptor is intended for development time assistance in debugging problems in pedestal services. Including it in interceptor paths on production systems may present a security risk by exposing call stacks of the application when exceptions are encountered.
+http-interceptor-service-fn
(http-interceptor-service-fn interceptors)
(http-interceptor-service-fn interceptors default-context)
(http-interceptor-service-fn interceptors default-context options)
Returns a function which can be used as an implementation of the Servlet.service method. It executes the interceptors (which must be already converted into Interceptor records) on an initial context map containing :servlet, :servlet-config, :servlet-request, and :servlet-response. The stylobate and ring-response interceptors are prepended to the sequence of interceptors.
Options: :exception-analyzer - function that analyzes exceptions that propagate up to the stylobate interceptor, defaults to default-exception-analyzer.
This is normally called automatically from io.pedestal.http/service-fn.
-ring-response
An interceptor which transmits a Ring specified response map to an HTTP response.
+ring-response
An interceptor which transmits a Ring specified response map to an HTTP response.
If a later interceptor in this context throws an exception which is not caught, this interceptor will set the HTTP response status code to 500 with a generic error message. Also, if later interceptors fail to furnish the context with a :response map, this interceptor will set the HTTP response to a 500 error.
-stylobate
deprecated in 0.7.0
An interceptor which primarily handles uncaught exceptions thrown during execution of the interceptor chain.
+stylobate
deprecated in 0.7.0
An interceptor which primarily handles uncaught exceptions thrown during execution of the interceptor chain.
This var is deprecated in 0.7.0 as it should only be added to the interceptor chain by http-interceptor-service-fn.
-terminator-injector
deprecated in 0.7.0
An interceptor which causes execution to terminate when one of the interceptors produces a response, as defined by ring.util.response/response?
+terminator-injector
deprecated in 0.7.0
An interceptor which causes execution to terminate when one of the interceptors produces a response, as defined by ring.util.response/response?
Prior to 0.7.0, this interceptor was automatically queued. In 0.7.0, the context is initialized with a terminator function and this interceptor is no longer used.
-WriteableBody
protocol
members
WriteableBody
protocol
members
default-content-type
(default-content-type body)
Get default HTTP content-type for body
.
write-body-to-stream
(write-body-to-stream body output-stream)
Write body
to the stream output-stream.
WriteableBodyAsync
protocol
members
write-body-async
(write-body-async body servlet-response resume-chan context)
WriteableBodyAsync
protocol
members
write-body-async
(write-body-async body servlet-response resume-chan context)
Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.impl.servlet-interceptor.specs
Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.impl.servlet-interceptor.specs
Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.jetty.container
Extends Pedestal protocols onto Jetty container classes.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.jetty.container
Extends Pedestal protocols onto Jetty container classes.
Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.jetty
Jetty adaptor for Pedestal.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.jetty
Jetty adaptor for Pedestal.
server
(server service-map)
(server service-map options)
Called from io.pedestal.http/server to create a Jetty server instance.
-start
deprecated in 0.7.0
(start server options)
Deprecated; to be made private in the future.
-start
deprecated in 0.7.0
(start server options)
Deprecated; to be made private in the future.
+Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.jetty.util
add-servlet-filter
(add-servlet-filter context filter-opts)
Add a ServletFilter to a ServletContextHandler, given the context and a map that contains: :filter - A FilterHolder, Filter class, or a String of a Filter class and optionally contains: :path - The pathSpec string that applies to the filter; defaults to ‘/*’ :dispatches - A keyword signaling the defaults to :request
-dispatcher-set
(dispatcher-set dispatches)
Return a dispatch EnumSet given one of: - an EnumSet (no-op) - servlet DispatcherType - a keyword representation of DispatcherType (see dispatch-types
) - :all
which generates an EnumSet of all DispatcherTypes
Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.jetty.util
add-servlet-filter
(add-servlet-filter context filter-opts)
Add a ServletFilter to a ServletContextHandler, given the context and a map that contains: :filter - A FilterHolder, Filter class, or a String of a Filter class and optionally contains: :path - The pathSpec string that applies to the filter; defaults to ‘/*’ :dispatches - A keyword signaling the defaults to :request
+dispatcher-set
(dispatcher-set dispatches)
Return a dispatch EnumSet given one of: - an EnumSet (no-op) - servlet DispatcherType - a keyword representation of DispatcherType (see dispatch-types
) - :all
which generates an EnumSet of all DispatcherTypes
Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.params
keyword-body-params
Interceptor that converts the :body-params map to be keyed by keywords
-Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.params
keyword-body-params
Interceptor that converts the :body-params map to be keyed by keywords
+Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.request
deprecated in 0.7.0
Proxies around container data; under-utilized and to be removed in a future release.
-ContainerRequest
protocol
members
async-started?
(async-started? x)
async-supported?
(async-supported? x)
body
(body x)
header
(header x header-string)
headers
(headers x)
path-info
(path-info x)
protocol
(protocol x)
query-string
(query-string x)
remote-addr
(remote-addr x)
request-method
(request-method x)
scheme
(scheme x)
server-name
(server-name x)
server-port
(server-port x)
ssl-client-cert
(ssl-client-cert x)
uri
(uri x)
ProxyDatastructure
protocol
A lazy proxy around a fully-realized data structure.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.request
deprecated in 0.7.0
Proxies around container data; under-utilized and to be removed in a future release.
+ContainerRequest
protocol
members
async-started?
(async-started? x)
async-supported?
(async-supported? x)
body
(body x)
header
(header x header-string)
headers
(headers x)
path-info
(path-info x)
protocol
(protocol x)
query-string
(query-string x)
remote-addr
(remote-addr x)
request-method
(request-method x)
scheme
(scheme x)
server-name
(server-name x)
server-port
(server-port x)
ssl-client-cert
(ssl-client-cert x)
uri
(uri x)
ProxyDatastructure
protocol
A lazy proxy around a fully-realized data structure.
This is deprecated in 0.7.0 and will likely be removed in the future.
members
realized
(realized this)
Return fully-realized version of underlying data structure.
-Generated by Codox
io.pedestal libraries 0.7.0
io.pedestal.http.request.lazy
deprecated in 0.7.0
classify-keys
(classify-keys [_k v])
Classify key-value pair based on whether its value is delayed, realized, or normal.
-derefing-map-entry
(derefing-map-entry kv)
(derefing-map-entry k v)
Create a new MapEntry-like object, but allow for values to be transparently derefed when accessed.
+Generated by Codox
io.pedestal libraries 0.7.1
io.pedestal.http.request.lazy
deprecated in 0.7.0
classify-keys
(classify-keys [_k v])
Classify key-value pair based on whether its value is delayed, realized, or normal.
+derefing-map-entry
(derefing-map-entry kv)
(derefing-map-entry k v)
Create a new MapEntry-like object, but allow for values to be transparently derefed when accessed.
Does not provide the same level of ‘equivalency’ checking that MapEntry does. Use ‘seq’ to get a realized pair of key-value.
-lazy-request
(lazy-request m)
Return a LazyRequest map that transparently derefs values that are delays.
+lazy-request
(lazy-request m)
Return a LazyRequest map that transparently derefs values that are delays.
Example: (:foo (lazy-request {:foo (delay :bar)})) ;; => :bar
LazyRequest’s are value-equal to other LazyRequest’s that share the same underlying map, but not to raw maps. Use raw
or realized
to return plain maps of original key-vals or realized key-vals, respectively.
LazyDatastructure
protocol
Utilities for manipulating/realizing lazy data structures.
members
touch
(touch this)
Realize all portions of the underlying data structure. Returns this.
-RawAccess
protocol
Utilities for exposing raw access to advanced data structures that layer new semantics onto simpler types.
+RawAccess
protocol
Utilities for exposing raw access to advanced data structures that layer new semantics onto simpler types.
members
raw
(raw this)
Return the raw data structure underlying a more advanced wrapper
-