THttpServerResponse.Close Method
Overloads
THttpServerResponse.Close
Finishes the response, flushing any pending body data and sending the headers if they have not been sent yet.
Remarks
When no body has been written and no content length was set, a zero-length body is assumed.
After this call, Closed is True.
Syntax
Unit: Sparkle.HttpServer.Response
procedure THttpServerResponse.Close; overload;
See also
THttpServerResponse.Close(TBytes)
Writes the given bytes as the complete response body and then closes the response.
Remarks
When the headers have not been sent and the response is not chunked, ContentLength is set to the length of AContent before sending.
Syntax
Unit: Sparkle.HttpServer.Response
procedure THttpServerResponse.Close(AContent: TBytes); overload;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| AContent | TBytes | The bytes to send as the response body. |