Returns a 304 if an If-Modified-Since header or If-None-Match is present. Returns the same as a GET otherwise.
GEThttps://httpbin.org/cache
Returns a 304 if an If-Modified-Since header or If-None-Match is present. Returns the same as a GET otherwise.
Request
Header Parameters
If-Modified-Since string
If-None-Match string
Responses
- 200
- 304
Cached response.
- application/json
- Schema
- Example (auto)
Schema
objectobject
{}
Not modified.
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
conn = http.client.HTTPSConnection("httpbin.org")
payload = ''
headers = {
'Accept': 'application/json'
}
conn.request("GET", "/cache", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear