{"id":16883963,"url":"https://github.com/saehun/pasted-request","last_synced_at":"2026-04-10T16:32:41.784Z","repository":{"id":42634853,"uuid":"380046689","full_name":"saehun/pasted-request","owner":"saehun","description":"Generate a http request config from a curl command string or a raw http request string.","archived":false,"fork":false,"pushed_at":"2023-01-07T08:41:01.000Z","size":484,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T20:55:32.953Z","etag":null,"topics":["axios","curl","http","nodejs","parser","request","typescript"],"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/saehun.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":"2021-06-24T20:47:30.000Z","updated_at":"2023-03-07T14:51:30.000Z","dependencies_parsed_at":"2023-02-06T17:01:19.414Z","dependency_job_id":null,"html_url":"https://github.com/saehun/pasted-request","commit_stats":null,"previous_names":["saehun/pasted-request","minidonut/pasted-request"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saehun/pasted-request","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fpasted-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fpasted-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fpasted-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fpasted-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saehun","download_url":"https://codeload.github.com/saehun/pasted-request/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fpasted-request/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269771912,"owners_count":24473324,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["axios","curl","http","nodejs","parser","request","typescript"],"created_at":"2024-10-13T16:15:56.737Z","updated_at":"2026-04-10T16:32:41.722Z","avatar_url":"https://github.com/saehun.png","language":"TypeScript","readme":"# Pasted Request\n![license](https://img.shields.io/npm/l/pasted-request)\n![version](https://img.shields.io/npm/v/pasted-request)\n\nGenerate a http request config from a curl command string or a raw http request string.\n\n## Installation\n```sh\nyarn add pasted-request\nnpm i pasted-reqeust\n```\n\n## Usage\n```typescript\nimport axios from 'axios;\nimport request from 'pasted-request'\n\nconst reqbin = request.curl`\ncurl -X POST https://reqbin.com/echo/post/json?foo=true \\\n-H \"Accept: application/json\" \\\n-H \"Content-Type: application/x-www-form-urlencoded\" \\\n-d \"Id=78912\u0026Customer=Jason%20Sweet\"\n`\nreqbin.method // 'post'\n\nreqbin.url(); // https://reqbin.com/echo/post/json?foo=true\nreqbin.url({ foo: false, bar: 'baz' }); // https://reqbin.com/echo/post/json?foo=false\u0026bar=baz\n\nreqbin.headers(); // { 'accept': 'application/json', 'content-type': 'application/x-www-form-urlencoded' }\nreqbin.headers({ cookie: 'foo=bar' }); // { 'accept': 'application/json', 'content-type': 'application/x-www-form-urlencoded': 'cookie': 'foo=bar' }\n\nreqbin.body(); // 'Id=78912\u0026Customer=Jason%20Sweet'\nreqbin.body({Id: 1000}); // 'Id=1000\u0026Customer=Jason%20Sweet'\n\n\n// same as above\nconst reqbin2 = request.http`\nPATCH /echo/post/json?foo=true HTTP/1.1\nHost: reqbin.com\nAccept: application/json\nContent-Type: application/json\nContent-Length: 81\n\n{\n  \"Id\": 78912,\n  \"Customer\": \"Jason Sweet\"\n}\n`\n\nconst { method, url, headers, body } = reqbin2;\n\naxios[method](url(), body(), { headers: headers() })\n  .then(response =\u003e response.data)\n  .then(console.log)\n\n```\n\n## Caveat\nParser only supports simple GET, DELETE requests and `application/json` or `application/x-www-form-urlencoded` POST, PATCH, PUT request only.\n\n## License\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaehun%2Fpasted-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaehun%2Fpasted-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaehun%2Fpasted-request/lists"}