Skip to content

API

Curl-to-Code Converter

Paste a curl command and get working request code in Python, JavaScript, Go, and Rust.

import requests

url = 'https://api.example.com/users'
headers = {
    'Content-Type': 'application/json',
}
data = '{"name":"test"}'

response = requests.post(url, headers=headers, data=data)
print(response.status_code)
print(response.text)
POSThttps://api.example.com/users1 header