







![]() ![]() |
C# Webserver |
HttpClientContext..::.Respond Method (String, HttpStatusCode, String, String) |
HttpClientContext Class See Also Send Feedback |
Send a response.
Namespace:
HttpServer
Assembly:
HttpServer (in HttpServer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public void Respond( string httpVersion, HttpStatusCode statusCode, string reason, string body ) |
Visual Basic (Declaration) |
---|
Public Sub Respond ( _ httpVersion As String, _ statusCode As HttpStatusCode, _ reason As String, _ body As String _ ) |
Visual C++ |
---|
public: void Respond( String^ httpVersion, HttpStatusCode statusCode, String^ reason, String^ body ) |
Parameters
- httpVersion
- Type: System..::.String
Either HttpHelper.HTTP10 or HttpHelper.HTTP11
- statusCode
- Type: System.Net..::.HttpStatusCode
http status code
- reason
- Type: System..::.String
reason for the status code.
- body
- Type: System..::.String
html body contents, can be null or empty.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentException | If httpVersion is invalid. |