Swagger Petstore REDOCLY 3.1
pet
Finds Pets by tags
1 min
code examples curl location '//petstore swagger io/v2/pet/findbytags?tags=array' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("//petstore swagger io/v2/pet/findbytags?tags=array", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("//petstore swagger io/v2/pet/findbytags?tags=array") http = net http new(url host, url port); request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = http request(request) puts response read body import requests import json url = "//petstore swagger io/v2/pet/findbytags?tags=array" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful operation \[ { "id" 0, "category" { "id" 0, "name" "", "sub" { "prop1" "" } }, "name" "guru", "photourls" "", "friend" { "" "" }, "tags" \[ { "id" 0, "name" "" } ], "status" "", "pettype" "", "huntingskill" 0 } ]// invalid tag value
🤔
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.