HttpListener myListener = new HttpListener("http", -1);
myListener.Start();
while (true)
{
HttpListenerResponse response = null;
try
{
Debug.Print("Waiting for requests");
HttpListenerContext context = myListener.GetContext();
Status codes indicate categories, as follows:
1xx -- Informational.
2xx -- Successful.
3xx -- Redirection.
4xx -- Client Error.
5xx -- Server Error.
Accept: text/plain, text/html
then
Header-Name: Header-Value\r\n
Header-Name2: Header-Value2\r\n
...
Header-NameN: Header-ValueN\r\n
\r\n
Header-Name1: Header-Value1\r\n
Header-Name2: Header-Value2\r\n
...
Header-NameN: Header-ValueN\r\n
\r\n
The
-or-
The scheme specified in
-or-
-or-
The password specified in
-or-
The host name specified in
-or-
The file name specified in
-or-
The user name specified in
-or-
The host or authority name specified in
-or-
The port number specified in
-or-
The length of
-or-
The length of the scheme specified in
-or-
There is an invalid character sequence in
-or-
The MS-DOS path specified in