{"id":13584760,"url":"https://github.com/curl/h2c","last_synced_at":"2025-11-08T22:02:41.102Z","repository":{"id":41097712,"uuid":"101638813","full_name":"curl/h2c","owner":"curl","description":"headers 2 curl. Provided a set of HTTP request headers, output the curl command line for generating that set. Try the converter online at","archived":false,"fork":false,"pushed_at":"2022-06-27T15:34:23.000Z","size":54,"stargazers_count":258,"open_issues_count":5,"forks_count":25,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-29T15:32:25.237Z","etag":null,"topics":["converter","curl","http","http-client","http-header"],"latest_commit_sha":null,"homepage":"https://curl.se/h2c/","language":"Perl","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/curl.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":"2017-08-28T12:01:42.000Z","updated_at":"2024-10-28T16:47:18.000Z","dependencies_parsed_at":"2022-09-01T11:31:08.186Z","dependency_job_id":null,"html_url":"https://github.com/curl/h2c","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curl%2Fh2c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curl%2Fh2c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curl%2Fh2c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/curl%2Fh2c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/curl","download_url":"https://codeload.github.com/curl/h2c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248113030,"owners_count":21049768,"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":["converter","curl","http","http-client","http-header"],"created_at":"2024-08-01T15:04:30.325Z","updated_at":"2025-11-08T22:02:40.992Z","avatar_url":"https://github.com/curl.png","language":"Perl","readme":"# h2c\nheaders 2 curl. Provided a set of HTTP request headers, output the curl command line for generating that set.\n\n    $ cat test\n    HEAD  / HTTP/1.1\n    Host: curl.se\n    User-Agent: moo\n    Shoesize: 12\n\n    $ ./h2c \u003c test\n    curl --head --http1.1 --header Accept: --user-agent \"moo\" --header \"Shoesize: 12\" https://curl.se/\n\nor a more complicated one:\n\n    $ cat test2\n    PUT /this is me HTTP/2\n    Host: curl.se\n    User-Agent: moo on you all\n    Shoesize: 12\n    Cookie: a=12; b=23\n    Content-Type: application/json\n    Content-Length: 57\n\n    {\"I do not speak\": \"jason\"}\n    {\"I do not write\": \"either\"}\n\n    $ ./h2c \u003c test2\n    curl --http2 --header Accept: --user-agent \"moo on you all\" --header \"shoesize: 12\" --cookie \"a=12; b=23\" --header \"content-type: application/json\" --data-binary \"{\\\"I do not speak\\\": \\\"jason\\\"} {\\\"I do not write\\\": \\\"either\\\"}\" --request PUT \"https://curl.se/this is me\"\n\nmultipart!\n\n    $ cat multipart\n    POST /upload HTTP/1.1\n    Host: example.com\n    User-Agent: curl/7.55.0\n    Accept: */*\n    Content-Length: 1236\n    Expect: 100-continue\n    Content-Type: multipart/form-data; boundary=------------------------2494bcbbb6e66a98\n\n    --------------------------2494bcbbb6e66a98\n    Content-Disposition: form-data; name=\"name\"\n\n    moo\n    --------------------------2494bcbbb6e66a98\n    Content-Disposition: form-data; name=\"file\"; filename=\"README.md\"\n    Content-Type: application/octet-stream\n\n    contents\n\n    --------------------------2494bcbbb6e66a98--\n\n    $ ./h2c \u003c multipart\n    curl --http1.1 --user-agent \"curl/7.55.0\" --form name=moo --form file=@README.md https://example.com/upload\n\nauthentication\n\n    $ cat basic\n    GET /index.html HTTP/2\n    Host: example.com\n    Authorization: Basic aGVsbG86eW91Zm9vbA==\n    Accept: */*\n\n    $ ./h2c \u003c basic\n    curl --http2 --header User-Agent: --user \"hello:youfool\" https://example.com/index.html\n","funding_links":[],"categories":["Perl"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurl%2Fh2c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurl%2Fh2c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurl%2Fh2c/lists"}