Skip to main content

Get user by user name

GET 

https://petstore.swagger.io/v2/user/:username

Request

Responses

successful operation

import http.client

conn = http.client.HTTPSConnection("petstore.swagger.io")
payload = ''
headers = {
'Accept': 'application/json'
}
conn.request("GET", "/v2/user/:username", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://petstore.swagger.io/v2
Parameters
— pathrequired
ResponseClear

Click the Send API Request button above and see the response here!