100

Continue

Overview

100 Continue is an interim response, not a final one. It tells the client that the server has inspected the request headers and it is fine to send the request body; it only appears when the client included an Expect: 100-continue header.

This handshake avoids wasting bandwidth: if the server would reject the request (auth failure, size limit, and so on), it can refuse before the client streams a multi-megabyte body. The real final status (200, 201, …) arrives separately once the body has been sent.

When it happens

Request / Response example

Request
PUT /uploads/large-file.bin HTTP/1.1
Host: api.example.com
Content-Length: 10485760
Expect: 100-continue
Content-Type: application/octet-stream
Response
HTTP/1.1 100 Continue

(client now streams the 10 MB body, then receives the final response)

HTTP/1.1 201 Created
Location: /uploads/large-file.bin

In code

curl -v --data-binary @large.bin \
  -H 'Expect: 100-continue' \
  https://api.example.com/upload
import requests
r = requests.put('https://api.example.com/upload',
                 data=open('large.bin', 'rb'),
                 headers={'Expect': '100-continue'})
print(r.status_code)  # final status, e.g. 201

Notes

Related status codes

Related headers

Specification