{"id":16970013,"url":"https://github.com/joalisonpereira/axios2curl","last_synced_at":"2025-04-12T00:21:24.135Z","repository":{"id":207805067,"uuid":"720039025","full_name":"joalisonpereira/axios2curl","owner":"joalisonpereira","description":"An axios plugin that translates requests into cURL commands","archived":false,"fork":false,"pushed_at":"2024-05-08T12:24:56.000Z","size":178,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T09:39:44.387Z","etag":null,"topics":["axios","curl","debug","debuggin","http","javascript","log","logging","node","shell"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/joalisonpereira.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-17T12:57:12.000Z","updated_at":"2024-05-08T12:25:06.000Z","dependencies_parsed_at":"2024-05-08T13:44:42.421Z","dependency_job_id":null,"html_url":"https://github.com/joalisonpereira/axios2curl","commit_stats":null,"previous_names":["joalisonpereira/axios2curl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joalisonpereira%2Faxios2curl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joalisonpereira%2Faxios2curl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joalisonpereira%2Faxios2curl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joalisonpereira%2Faxios2curl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joalisonpereira","download_url":"https://codeload.github.com/joalisonpereira/axios2curl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248498092,"owners_count":21114037,"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":["axios","curl","debug","debuggin","http","javascript","log","logging","node","shell"],"created_at":"2024-10-14T00:27:12.356Z","updated_at":"2025-04-12T00:21:24.096Z","avatar_url":"https://github.com/joalisonpereira.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axios2curl\n\n![](./docs/badge-statements.svg) ![](./docs/badge-functions.svg) ![](./docs/badge-lines.svg) ![](./docs/badge-branches.svg)\n\nAn axios plugin that translates requests into cURL commands.\n\n## Install\n\n```bash\nnpm install axios2curl@latest\n```\n\n## Usage\n\n```typescript\nimport { axios2Curl } from 'axios2curl';\nimport axios from 'axios';\n\nconst api = axios.create({ baseURL: 'http://localhost:3000' });\n\naxios2Curl(api, (curl) =\u003e console.info(curl));\n```\n\n#### Log\n\n```shell\ncurl -X GET \"http://localhost:3000/\" -H \"Accept: application/json, text/plain, */*\"\n```\n\n## Disable the logger\n\nBy default, all requests will be logged. However, you can disable this behavior on a per-request basis by setting the header `___DISABLE_CURL___` to true. Rest assured, we will remove this header before your request is processed.\n\n```typescript\nimport { axios2Curl, DISABLE_CURL } from 'axios2curl';\nimport axios from 'axios';\n\naxios2Curl(axios, (curl) =\u003e console.info(curl));\n\naxios\n  .get(\n    'http://localhost:3000',\n     headers: {\n      [DISABLE_CURL]: 'true'\n    }\n)\n  .then(() =\u003e {\n    console.log('Success');\n  })\n  .catch(() =\u003e {\n    console.log('Error');\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoalisonpereira%2Faxios2curl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoalisonpereira%2Faxios2curl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoalisonpereira%2Faxios2curl/lists"}