{"id":18002461,"url":"https://github.com/iamd3vil/rifle","last_synced_at":"2025-04-04T09:14:39.392Z","repository":{"id":57544008,"uuid":"139171409","full_name":"iamd3vil/rifle","owner":"iamd3vil","description":"Elixir HTTP Client Library. Wrapper over Gun (https://github.com/ninenines/gun) with connection pooling","archived":false,"fork":false,"pushed_at":"2018-06-30T10:43:38.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T20:58:37.535Z","etag":null,"topics":["elixir","gun","http","http-client","http2"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamd3vil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-29T16:19:33.000Z","updated_at":"2023-10-18T07:51:42.000Z","dependencies_parsed_at":"2022-08-27T19:11:12.079Z","dependency_job_id":null,"html_url":"https://github.com/iamd3vil/rifle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamd3vil%2Frifle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamd3vil%2Frifle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamd3vil%2Frifle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamd3vil%2Frifle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamd3vil","download_url":"https://codeload.github.com/iamd3vil/rifle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149510,"owners_count":20891954,"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":["elixir","gun","http","http-client","http2"],"created_at":"2024-10-29T23:21:56.030Z","updated_at":"2025-04-04T09:14:39.370Z","avatar_url":"https://github.com/iamd3vil.png","language":"Elixir","readme":"# Rifle\n\nRifle is a wrapper over [Gun](https://github.com/ninenines/gun). Rifle also provides pooling for Gun and reuses connections. Currently *WIP*\n\n## Installation\n\n`Rifle` is available as a Hex package. You need to add `gun`, before adding `rifle` to your `deps()` in `mix.exs`.\n\n\n```elixir\ndefp deps do\n  [\n    {:gun, \"== 1.0.0-pre.5\"},\n    {:rifle, \"~\u003e 0.1\"}\n  ]\nend\n```\n\n## Usage\n\nIn `Rifle`, you need to define a service(a domain and port to connect to). Then Rifle spawns a pool of Gun connections and spreads the requests on the pool of connections. Requests can be made on a service or pool.\n\nTo create a pool, you can add this line to your supervisor.\n\n`{Rifle, %{name: :httpbin, domain: \"httpbin.org\", port: 443, pool_size: 10}}`\n\n#### Options can contain:\n\n- `name` - This needs to be the name of the pool or service. Needs to be unique.\n- `domain` - Domain of the service\n- `port` - Port it needs to connect to. If `443` is provided, it will automatically use TLS.\n- `pool_size` - Number of `Gun` connections to create.\n\nAdding this line will create supervisor with pool of connections.\n\n#### For making requests:\n\n`Rifle.get/4`, `Rifle.post/5`, `Rifle.delete/5`, `Rifle.put/5`, `Rifle.head/5`, `Rifle.options/5` or `requests/6` can be used to place requests.\n\n\n## TODO \n\n- [x] HTTP 1.1 \u0026 HTTP 2 support\n- [ ] Websockets support\n- [ ] Better Documentation\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamd3vil%2Frifle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamd3vil%2Frifle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamd3vil%2Frifle/lists"}