{"id":13720868,"url":"https://github.com/aesiniath/http-streams","last_synced_at":"2025-04-06T17:12:59.326Z","repository":{"id":5922659,"uuid":"7142302","full_name":"aesiniath/http-streams","owner":"aesiniath","description":"Haskell HTTP client library for use with io-streams","archived":false,"fork":false,"pushed_at":"2023-10-20T05:41:32.000Z","size":766,"stargazers_count":50,"open_issues_count":19,"forks_count":48,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-10T11:32:40.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/http-streams","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aesiniath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-12-13T03:59:53.000Z","updated_at":"2024-06-19T00:27:41.936Z","dependencies_parsed_at":"2024-06-19T00:27:25.720Z","dependency_job_id":null,"html_url":"https://github.com/aesiniath/http-streams","commit_stats":{"total_commits":438,"total_committers":34,"mean_commits":"12.882352941176471","dds":"0.20547945205479456","last_synced_commit":"0326a7ec52f3d01a9c3098bef0b5b5d82617cadb"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Fhttp-streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Fhttp-streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Fhttp-streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aesiniath%2Fhttp-streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aesiniath","download_url":"https://codeload.github.com/aesiniath/http-streams/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517916,"owners_count":20951719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:01:09.086Z","updated_at":"2025-04-06T17:12:59.296Z","avatar_url":"https://github.com/aesiniath.png","language":"Haskell","readme":"An HTTP client\n==============\n\nAn HTTP client library for Haskell using the Snap Framework's\n[io-streams](https://hackage.haskell.org/package/io-streams) library to handle\nthe streaming IO.\n\nA common case in writing RESTful web services is needing to make onward calls\nto further servers. This package is intended to make this easy to do.\nThough originally written for making calls from web apps written with\nSnap, you can use this from any library or framework.\n\nEnjoy!\n\nExample\n-------\n\nThe underlying API is very simple:\n\n```haskell\nmain :: IO ()\nmain = do\n    c \u003c- openConnection \"www.example.com\" 80\n    \n    let q = buildRequest1 $ do\n                http GET \"/\"\n                setAccept \"text/html\"\n    \n    sendRequest c q emptyBody\n    \n    receiveResponse c (\\p i -\u003e do\n    \tputStr $ show p\n\n    \tx \u003c- Streams.read i\n    \tS.putStr $ fromMaybe \"\" x)\n    \n    closeConnection c\n```\n\nThere are also convenience functions for the common case of making\nstraight-forward GET and POST requests; for instance:\n\n```haskell\n    get \"http://www.example.com/\" (\\_ i -\u003e Streams.connect i stdout)\n```\n\nwill _{ahem}_ stream the response body to stdout. Perhaps more\ninteresting (though less streams-oriented), is simply getting the\nresponse as a ByteString using one of the pre-defined handlers:\n\n```haskell\n    x' \u003c- get \"https://secure.example.com/\" concatHandler\n```\n\nSee the documentation in\n[Network.Http.Client](https://hackage.haskell.org/package/http-streams/docs/Network-Http-Client.html)\nfor further examples and details of usage of the API.\n","funding_links":[],"categories":["Programming Languages"],"sub_categories":["Haskell"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faesiniath%2Fhttp-streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faesiniath%2Fhttp-streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faesiniath%2Fhttp-streams/lists"}