Skip to content

Instantly share code, notes, and snippets.

View gregblake's full-sized avatar
👨‍💻

Greg Blake gregblake

👨‍💻
View GitHub Profile
@etagwerker
etagwerker / curl_to_ab.py
Last active April 11, 2020 11:15 — forked from ctolsen/curl_to_ab.py
"Copy to cURL" in Chrome to Apache Bench command -- Script for Python3
#!/usr/bin/env python3
import sys
import os
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str:
"""
Translate a cURL command created by Chrome's developer tools into a
command for ``ab``, the ApacheBench HTTP benchmarking tool.