{"id":13728287,"url":"https://github.com/perfectayush/curl2tsung","last_synced_at":"2026-02-20T18:44:58.125Z","repository":{"id":149681141,"uuid":"73716046","full_name":"perfectayush/curl2tsung","owner":"perfectayush","description":"A simple utility to convert a curl request to tsung's xml request","archived":false,"fork":false,"pushed_at":"2016-11-14T20:06:46.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-04T02:07:56.481Z","etag":null,"topics":["curl","replacing-curl","tsung","tsung-xml-request"],"latest_commit_sha":null,"homepage":"","language":"Python","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/perfectayush.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}},"created_at":"2016-11-14T15:04:05.000Z","updated_at":"2020-04-20T11:24:49.000Z","dependencies_parsed_at":"2024-01-07T16:42:30.552Z","dependency_job_id":null,"html_url":"https://github.com/perfectayush/curl2tsung","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectayush%2Fcurl2tsung","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectayush%2Fcurl2tsung/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectayush%2Fcurl2tsung/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perfectayush%2Fcurl2tsung/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perfectayush","download_url":"https://codeload.github.com/perfectayush/curl2tsung/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224679880,"owners_count":17351883,"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":["curl","replacing-curl","tsung","tsung-xml-request"],"created_at":"2024-08-03T02:00:39.952Z","updated_at":"2024-11-14T19:30:55.295Z","avatar_url":"https://github.com/perfectayush.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":["Miscellaneous"],"readme":"# curl2tsung\nA simple utility to convert a curl request to tsung's xml request. Useful for\nquickly generating tsung's xml conf rather than typing xml yourself.\n\n[Firefox](https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor#Copy_as_cURL) and\n[Chrome](https://developers.google.com/web/tools/chrome-devtools/network-performance/resource-loading#curl) support\ncopying an http request as curl command from the web developer tools. You can\nuse that feature to copy a request as curl and then replace curl with curl2tsung\nscript. It currently supports only the most common curl options I encountered\nwhile dealing curl commands generated with firefox and chrome developer tools.\n\n## Usage\n\nA request to github.com, 'copied as curl' from chrome developer tools looks like this\n\n``` shell\ncurl 'https://github.com/' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en;q=0.8' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36' --compressed\n```\n\nReplacing curl with curl2tsung utility generates following output:\n\n``` xml\n\u003crequest\u003e\n  \u003chttp method=\"GET\" url=\"https://github.com/\" version=\"1.1\"\u003e\n    \u003chttp_header name=\"Accept-Language\" value=\"en-US,en;q=0.8\"/\u003e\n    \u003chttp_header name=\"Accept-Encoding\" value=\"gzip, deflate, sdch, br\"/\u003e\n    \u003chttp_header name=\"Accept\" value=\"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\"/\u003e\n    \u003chttp_header name=\"User-Agent\" value=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36\"/\u003e\n    \u003chttp_header name=\"Connection\" value=\"keep-alive\"/\u003e\n    \u003chttp_header name=\"Upgrade-Insecure-Requests\" value=\"1\"/\u003e\n  \u003c/http\u003e\n\u003c/request\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectayush%2Fcurl2tsung","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperfectayush%2Fcurl2tsung","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperfectayush%2Fcurl2tsung/lists"}