Versioning
curl -X GET \
'https://api.waifu.im/search' \
-H 'Content-Type: application/json' \
-H 'Accept-Version: v6'import requests
url = 'https://api.waifu.im/search'
headers = {
'Accept-Version': 'v6'
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
# Process the response data as needed
else:
print('Request failed with status code:', response.status_code)
const apiUrl = 'https://api.waifu.im/search';
const headers = new Headers();
headers.append('Accept-Version', 'v6');
fetch(apiUrl, { headers })
.then(response => {
if (response.ok) {
return response.json();
} else {
throw new Error('Request failed with status code: ' + response.status);
}
})
.then(data => {
// Process the response data as needed
console.log(data);
})
.catch(error => {
console.error('An error occurred:', error.message);
});
Last updated