{"id":23222949,"url":"https://github.com/dckt/rescript-axios","last_synced_at":"2026-03-10T14:32:17.483Z","repository":{"id":146972866,"uuid":"455173486","full_name":"DCKT/rescript-axios","owner":"DCKT","description":"Axios bindings with reason-promise","archived":false,"fork":false,"pushed_at":"2024-07-11T07:43:33.000Z","size":56,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-05T16:35:03.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ReScript","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/DCKT.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":"2022-02-03T13:21:52.000Z","updated_at":"2024-07-11T07:43:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"863b5c69-c818-431d-a228-3c7592ac4b28","html_url":"https://github.com/DCKT/rescript-axios","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/DCKT/rescript-axios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCKT%2Frescript-axios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCKT%2Frescript-axios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCKT%2Frescript-axios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCKT%2Frescript-axios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCKT","download_url":"https://codeload.github.com/DCKT/rescript-axios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCKT%2Frescript-axios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30337219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"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":[],"created_at":"2024-12-18T23:15:27.556Z","updated_at":"2026-03-10T14:32:17.467Z","avatar_url":"https://github.com/DCKT.png","language":"ReScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rescript-axios\n\nAxios bindings with [@dck/rescript-promise](https://github.com/DCKT/rescript-promise)\n\n## Setup\n\n```bash\nyarn add rescript-axios @dck/rescript-promise\n# or\nnpm i rescript-axios @dck/rescript-promise\n```\n\nAdd to the `bsconfig.json` dependencies :\n\n```json\n{\n  ...\n  \"bs-dependencies\": [\"rescript-axios\"]\n}\n```\n\n## Usage\n\n### Basic\n\n```rescript\nAxios.get(\"http://myapi.com/test\", ())\n-\u003ePromise.Js.toResult\n-\u003ePromise.mapOk(({data}) =\u003e data)\n-\u003ePromise.tapError(err =\u003e {\n  switch (err.response) {\n    | Some({status: 404}) =\u003e Js.log(\"Not found\")\n    | e =\u003e Js.log2(\"an error occured\", e)\n  }\n})\n-\u003eignore\n```\n\n### With config\n\n```rescript\nlet config = Axios.makeConfig(~baseURL=\"http://localhost\", ())\n\nAxios.patch(\"/test\", ~data=Js.Obj.empty(), ~config, ())\n  -\u003ePromise.Js.toResult\n  -\u003ePromise.tapOk(({data}) =\u003e {\n    Js.log(data[\"resValue\"])\n  })\n  -\u003eignore\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdckt%2Frescript-axios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdckt%2Frescript-axios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdckt%2Frescript-axios/lists"}