{"id":19658130,"url":"https://github.com/cdaringe/fetch-to-curl-ts","last_synced_at":"2025-05-07T18:45:36.500Z","repository":{"id":239642455,"uuid":"800120876","full_name":"cdaringe/fetch-to-curl-ts","owner":"cdaringe","description":"A fork of leeok/fetch-to-curl with improved TS and stream support","archived":false,"fork":false,"pushed_at":"2024-05-17T22:50:39.000Z","size":60,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T19:46:40.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cdaringe.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":"2024-05-13T18:32:34.000Z","updated_at":"2025-02-10T04:59:56.000Z","dependencies_parsed_at":"2024-05-13T20:12:24.329Z","dependency_job_id":null,"html_url":"https://github.com/cdaringe/fetch-to-curl-ts","commit_stats":null,"previous_names":["cdaringe/fetch-to-curl-ts"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffetch-to-curl-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffetch-to-curl-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffetch-to-curl-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ffetch-to-curl-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/fetch-to-curl-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243648312,"owners_count":20324854,"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-11-11T15:36:12.325Z","updated_at":"2025-03-14T21:28:17.602Z","avatar_url":"https://github.com/cdaringe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fetch-to-curl-ts\n\nConvert [fetch](https://mdn.io/fetch) inputs to a [cURL](https://curl.se) string.\n\nFork of [leoek/fetch-to-curl](https://github.com/leoek/fetch-to-curl) with\nimproved TypeScript support and improved payload serialization.\n\n[![main](https://github.com/cdaringe/fetch-to-curl-ts/actions/workflows/main.yml/badge.svg)](https://github.com/cdaringe/fetch-to-curl-ts/actions/workflows/main.yml)\n\n## Installation\n\n```sh\nnpm install fetch-to-curl-ts\nyarn add fetch-to-curl-ts\npnpm install fetch-to-curl-ts\n```\n\n\n## Usage\n\n```js\nimport { fetchToCurl } from 'fetch-to-curl';\nconst curlString = await fetchToCurl('https://jsonplaceholder.typicode.com/posts/1', {\n  headers: {\n    accept: 'application/json'\n  }\n});\n// curlString ===\n// curl \"https://jsonplaceholder.typicode.com/posts/1\" -X GET -H 'accept: application/json'\n```\n\nSee [./src/__test__/main.test.ts](./src/__test__/main.test.ts) for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Ffetch-to-curl-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Ffetch-to-curl-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Ffetch-to-curl-ts/lists"}