| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sun, 18 Jan 2026 01:18:09 GMT
X-Served-By: cache-dfw-kdfw8210109-DFW, cache-bom-vanm7210045-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768699089.787364,VS0,VE294
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
apiary-http-client: A http client for Apiary.
[Skip to Readme]
apiary-http-client: A http client for Apiary.
A HTTP Client for Apiary, using Apiary's extension api, suitable for proxying HTTP request to backend API, with flexible APIs and streamming proxying abilities.
This module also reexport Network.HTTP.Client.
[Skip to Readme]
Downloads
- apiary-http-client-0.1.4.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.1.4.0 |
|---|---|
| Dependencies | apiary (>=2.1 && <3.0), base (>=4.6 && <5.0), bytestring (>=0.10 && <0.11), bytestring-builder (>=0.10 && <0.11), http-client (>=0.5 && <0.6), http-types (>=0.8), text (>=1.1 && <1.3), transformers (>=0.2 && <0.6), wai (>=3.0 && <3.3) [details] |
| License | MIT |
| Author | winterland |
| Maintainer | winterland1989@gmail.com |
| Uploaded | by winterland at 2017-11-01T10:24:06Z |
| Category | Web |
| Home page | https://github.com/winterland1989/apiary-http-client |
| Source repo | head: git clone https://github.com/winterland1989/apiary-http-client.git |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 4075 total (17 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2017-11-01 [all 1 reports] |
Readme for apiary-http-client-0.1.4.0
[back to package description]Apiary HTTP Client
A HTTP Client for Apiary, using Apiary's extension api, suitable for proxying HTTP request to backend API, with flexible APIs and streamming proxying abilities.
This module also reexport Network.HTTP.Client.
Example
import Web.Apiary
import Network.Wai.Handler.Warp
import Web.Apiary.HTTP.Client as HTTP
main :: IO ()
main = runApiaryWith (run 8080) (HTTP.initHTTPClient HTTP.defaultManagerSettings) def $ do
[capture|/query|] . action $ do
-- make a new Network.HTTP.Client.Request from current ActionT's Network.Wai.Request
-- it's recommended to use resetHeaders to remove following headers:
-- Transfer-Encoding, Content-Length, Content-Encoding and Accept-Encoding.
req <- HTTP.fromRequest id resetHeaders
-- set proxying host and port
-- use function from Network.HTTP.Client to modify more
let req' = HTTP.setHost "api.backend.com" . HTTP.setPort 80 $ req
-- send request and proxy respond in streamming fashion.
HTTP.proxyTo req'