docgen icon indicating copy to clipboard operation
docgen copied to clipboard

Additional Languages

Open CPSuperstore opened this issue 4 years ago • 0 comments

I was wondering if support for sample code of sending requests in different languages (ex. Python, Java...) would be possible

For example, each request would have a dropdown or something with options for different languages. For example, the Python language would be like so:

import requests
import json

url = "http://localhost:8080/"

payload = json.dumps({
    "some_key": "some_value"
})
headers = {
    'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Just like the code examples available in Postman

CPSuperstore avatar Jan 26 '22 16:01 CPSuperstore