Can a http request have multiple responses?

Viewed 34

Can one http request have multiple responses? (Response codes out of range 1XX)

Is such functionality supported by clients/servers?

client ----request-----------> server
client <---response1 (402)---- server 
client <---responsen2 (202)--- server 
...
client <---responseN (200)---- server 
1 Answers

No. In HTTP, one request gets one response. The client must send a second request to get a second response.

An HTTP request can have multiple "header responses", but the responses all have status codes in the 1xx range, such as 102 Processing. However, these responses are only headers, never bodies. Sending a response unsolicited is not allowed.

Related