Skip to content

Instantly share code, notes, and snippets.

View nbosscher's full-sized avatar

Nate Bosscher nbosscher

  • @LadderSoftware
  • Hamilton, Ontario, Canada
View GitHub Profile
@ctolsen
ctolsen / curl_to_ab.py
Last active May 15, 2022 16:19
"Copy to cURL" in Chrome to Apache Bench command
#!/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.