Utilities for PedestalConnectors to implement testing, and functions used when writing such tests.
Utilities for PedestalConnectors to implement testing, and functions used when writing such tests.
(disable-routing-table-output-fixture f)A test fixture that disables printing of the routing table, even when development mode is enabled. It also disables ANSI colors in any Pedestal console output (such as deprecation warnings).
A test fixture that disables printing of the routing table, even when development mode is enabled. It also disables ANSI colors in any Pedestal console output (such as deprecation warnings).
(execute-interceptor-chain initial-context interceptors request)Executes the interceptor chain for a Ring request, and returns a Ring response.
The :body of the Ring request is limited to nil, String, InputStream, or File.
The :body of the returned response map will be nil, or InputStream.
Executes the interceptor chain for a Ring request, and returns a Ring response. The :body of the Ring request is limited to nil, String, InputStream, or File. The :body of the returned response map will be nil, or InputStream.
Converts a supported type of Request body to an InputStream.
Converts a supported type of Request body to an InputStream.
(coerce-request-body this)Convert a value for a Ring request map's :body to an InputStream, for downstream processing.
Convert a value for a Ring request map's :body to an InputStream, for downstream processing.
(response-for connector request-method url & {:as options})Works with a [[PedestalConnector]] to test a Ring request map; returns a Ring response map.
The :body of the response map will be either nil, or an InputStream.
The response body is normally returned as a string, but the :as option allows for the body to be coerced to an InputStream or ByteBuffer.
Options:
| Key | Value |
|---|---|
| :headers | Map; keys and values are converted from keyword or symbol to string |
| :body | Body to send (nil, String, File, InputStream) |
| :as | Convert a non-nil body to this type (:string, :byte-buffer, :stream). :string is the default. |
Works with a [[PedestalConnector]] to test a Ring request map; returns a Ring response map. The :body of the response map will be either nil, or an InputStream. The response body is normally returned as a string, but the :as option allows for the body to be coerced to an InputStream or ByteBuffer. Options: Key | Value --- |--- :headers | Map; keys and values are converted from keyword or symbol to string :body | Body to send (nil, String, File, InputStream) :as | Convert a non-nil body to this type (:string, :byte-buffer, :stream). :string is the default.
Convert the body of the response to an InputStream (or nil).
Convert the body of the response to an InputStream (or nil).
(coerce-response-body this)Converts the response body to nil, a String, or an InputStream.
Converts the response body to nil, a String, or an InputStream.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |