Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perfectayush/curl2tsung
A simple utility to convert a curl request to tsung's xml request
https://github.com/perfectayush/curl2tsung
curl replacing-curl tsung tsung-xml-request
Last synced: 28 days ago
JSON representation
A simple utility to convert a curl request to tsung's xml request
- Host: GitHub
- URL: https://github.com/perfectayush/curl2tsung
- Owner: perfectayush
- License: mit
- Created: 2016-11-14T15:04:05.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-14T20:06:46.000Z (about 8 years ago)
- Last Synced: 2024-08-04T02:07:56.481Z (4 months ago)
- Topics: curl, replacing-curl, tsung, tsung-xml-request
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tsung - curl2tsung - A simple utility to convert a curl request to Tsung's xml request. (Tools / Miscellaneous)
README
# curl2tsung
A simple utility to convert a curl request to tsung's xml request. Useful for
quickly generating tsung's xml conf rather than typing xml yourself.[Firefox](https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor#Copy_as_cURL) and
[Chrome](https://developers.google.com/web/tools/chrome-devtools/network-performance/resource-loading#curl) support
copying an http request as curl command from the web developer tools. You can
use that feature to copy a request as curl and then replace curl with curl2tsung
script. It currently supports only the most common curl options I encountered
while dealing curl commands generated with firefox and chrome developer tools.## Usage
A request to github.com, 'copied as curl' from chrome developer tools looks like this
``` shell
curl '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
```Replacing curl with curl2tsung utility generates following output:
``` xml
```