{"id":32173032,"url":"https://github.com/alexandrubagu/simplehttp","last_synced_at":"2026-02-22T14:43:59.135Z","repository":{"id":57548221,"uuid":"67034350","full_name":"alexandrubagu/simplehttp","owner":"alexandrubagu","description":"HTTP client for Elixir without dependencies","archived":false,"fork":false,"pushed_at":"2023-09-26T04:06:41.000Z","size":77,"stargazers_count":17,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-14T18:45:25.413Z","etag":null,"topics":["client","elixir","http","http-client","httpc","no-dependencies","simplehttp"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/simplehttp","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/alexandrubagu.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":"2016-08-31T12:14:25.000Z","updated_at":"2024-02-11T02:35:49.000Z","dependencies_parsed_at":"2023-01-22T06:45:38.844Z","dependency_job_id":null,"html_url":"https://github.com/alexandrubagu/simplehttp","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/alexandrubagu/simplehttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrubagu%2Fsimplehttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrubagu%2Fsimplehttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrubagu%2Fsimplehttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrubagu%2Fsimplehttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandrubagu","download_url":"https://codeload.github.com/alexandrubagu/simplehttp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrubagu%2Fsimplehttp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29716358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T13:30:57.152Z","status":"ssl_error","status_checked_at":"2026-02-22T13:30:28.561Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["client","elixir","http","http-client","httpc","no-dependencies","simplehttp"],"created_at":"2025-10-21T18:48:23.541Z","updated_at":"2026-02-22T14:43:59.127Z","avatar_url":"https://github.com/alexandrubagu.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleHttp [![Travis](https://travis-ci.org/alexandrubagu/simplehttp.svg)](https://travis-ci.org/alexandrubagu/simplehttp) [![Hex.pm](https://img.shields.io/hexpm/v/simplehttp.svg?maxAge=2592000)](https://hex.pm/packages/simplehttp) [![Hex.pm](https://img.shields.io/hexpm/dt/simplehttp.svg?maxAge=2592000)](https://hex.pm/packages/simplehttp) [![Hex.pm](https://img.shields.io/hexpm/l/simplehttp.svg?maxAge=2592000)](https://hex.pm/packages/simplehttp) [![Coverage Status](https://coveralls.io/repos/github/alexandrubagu/simplehttp/badge.svg?branch=master)](https://coveralls.io/github/alexandrubagu/simplehttp?branch=master)\n\n## Unlike other projects / libraries, SimpleHttp doesn't have other dependencies\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003cth\u003eSimpleHttp\u003c/th\u003e\n      \u003cth\u003e \u003ca href=\"https://github.com/myfreeweb/httpotion\"\u003emyfreeweb/httpotion\u003c/a\u003e \u003c/th\u003e\n      \u003cth\u003e \u003ca href=\"https://github.com/edgurgel/httpoison\"\u003eedgurgel/httpoison\u003c/a\u003e \u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd valign=\"top\"\u003e\n        \u003cpre class=\"vicinity rich-diff-level-zero\"\u003e\n$ mix app.tree\nsimplehttp\n└── elixir\n\t    \u003c/pre\u003e\n      \u003c/td\u003e\n      \u003ctd valign=\"top\"\u003e\n        \u003cpre class=\"vicinity rich-diff-level-zero\"\u003e\n$ mix app.tree\nhttpotion\n├── elixir\n├── ssl\n│   ├── crypto\n│   └── public_key\n│       ├── asn1\n│       └── crypto\n└── ibrowse\n\t    \u003c/pre\u003e\n      \u003c/td\u003e\n      \u003ctd valign=\"top\"\u003e\n        \u003cpre class=\"vicinity rich-diff-level-zero\"\u003e\n$ mix app.tree\nhttpoison\n├── elixir\n└── hackney\n    ├── crypto\n    ├── asn1\n    ├── public_key\n    │   ├── asn1\n    │   └── crypto\n    ├── ssl\n    │   ├── crypto\n    │   └── public_key\n    ├── idna\n    ├── mimerl\n    ├── certifi\n    ├── ssl_verify_fun\n    │   └── ssl\n    └── metrics\n\t    \u003c/pre\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Hex Installation \n\n  1. Add `simplehttp` to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [{:simplehttp, \"~\u003e 0.5.1\"}]\n  end\n  ```\n\n\n## Usage\n\n*Note*:You can load SimpleHttp into the Elixir REPL by executing this command from the root of your project:\n\n```elixir\n$ iex -S mix\n```\n\nSimple GET Request\n```elixir\n{:ok, response} = SimpleHttp.get \"http://jsonplaceholder.typicode.com/posts/1\"\n\nIO.inspect response \n{:ok,\n%SimpleHttp.Response{\n  body: \"{\\n  \\\"userId\\\": 1,\\n  \\\"id\\\": 1,\\n  \\\"title\\\": \\\"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\\\",\\n  \\\"body\\\": \\\"quia et suscipit\\\\nsuscipit recusandae consequuntur expedita et cum\\\\nreprehenderit molestiae ut ut quas totam\\\\nnostrum rerum est autem sunt rem eveniet architecto\\\"\\n}\",\n  headers: [\n    {'cache-control', 'public, max-age=14400'},\n    {'connection', 'keep-alive'},\n    {'date', 'Mon, 22 Oct 2018 07:02:48 GMT'},\n    {'pragma', 'no-cache'},\n    {'via', '1.1 vegur'},\n    {'etag', 'W/\"124-yiKdLzqO5gfBrJFrcdJ8Yq0LGnU\"'},\n    {'server', 'cloudflare'},\n    {'vary', 'Origin, Accept-Encoding'},\n    {'content-length', '292'},\n    {'content-type', 'application/json; charset=utf-8'},\n    {'expires', 'Mon, 22 Oct 2018 11:02:48 GMT'},\n    {'set-cookie',\n      '__cfduid=de34235eb1c3436a238889924c15be9671540191768; expires=Tue, 22-Oct-19 07:02:48 GMT; path=/; domain=.typicode.com; HttpOnly'},\n    {'x-powered-by', 'Express'},\n    {'access-control-allow-credentials', 'true'},\n    {'x-content-type-options', 'nosniff'},\n    {'cf-cache-status', 'HIT'},\n    {'cf-ray', '46da19b6d5f87ea0-BUD'}\n  ],\n  status: 200\n}}\n```\n\nUse `headers_format: :binary` option to return headers as strings:\n```elixir\nSimpleHttp.get \"http://jsonplaceholder.typicode.com/posts/1\", headers_format: :binary |\u003e IO.inspect\n\n{:ok,\n%SimpleHttp.Response{\n  body: \"{ ... }\",\n  headers: [\n    {\"cache-control\", \"public, max-age=14400\"},\n    {\"connection\", \"keep-alive\"},\n    {\"date\", \"Mon, 22 Oct 2018 07:02:48 GMT\"},\n    ...\n  ],\n  status: 200\n}}\n```\n\n\n\nGET Request with query params\n```elixir\n{:ok, response} = SimpleHttp.get \"http://jsonplaceholder.typicode.com/posts/1\", [\n  query_params: [\n    postId: 1\n  ]\n]\n```\n\nDownload a file using a GET request\n```elixir\n{:ok, %Response{body: :saved_to_file}} = SimpleHttp.get \"https://jsonplaceholder.typicode.com/posts\", [\n  ssl: [verify: :verify_none], headers: %{\"User-Agent\" =\u003e \"Mozilla\"},\n  stream: \"/tmp/posts.xml\",\n  timeout: 5000\n]\n```\n\nPOST with JSON\n```elixir\n{:ok, response} = SimpleHttp.post \"http://jsonplaceholder.typicode.com/posts\", [\n  body: \"{\\\"name\\\":\\\"foo.example.com\\\"}\",\n  headers: %{\n    \"Content-Type\" =\u003e \"application/x-www-form-urlencoded\",\n    \"Authorization\" =\u003e \"Bearer hash\",\n    \"X-Customer\" =\u003e \"123\"\n  },\n  timeout: 1000,\n  connect_timeout: 1000\n]\n```\n\nPOST with params\n```elixir\n{:ok, response} = SimpleHttp.post \"http://jsonplaceholder.typicode.com/posts\", [\n  params: [\n    title: \"title is present here\",\n    message: \"hello world!\"\n  ],\n  headers: %{\n    \"Content-Type\" =\u003e \"application/x-www-form-urlencoded\",\n    \"Authorization\" =\u003e \"Bearer hash\",\n    \"X-Customer\" =\u003e \"123\"\n  },\n  timeout: 1000,\n  connect_timeout: 1000\n]\n```\n\nRun a request in a custom HTTP profile with custom options\n```elixir\n{:ok, response} = SimpleHttp.get \"https://jsonplaceholder.typicode.com/posts\", [\n  ssl: [verify: :verify_none], headers: %{\"User-Agent\" =\u003e \"Mozilla\"},\n  timeout: 5000,\n  profile: :test,\n  verbose: :verbose\n]\n:ok = SimpleHttp.close(response)  # Stop the HTTPC :test profile\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrubagu%2Fsimplehttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandrubagu%2Fsimplehttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrubagu%2Fsimplehttp/lists"}