Exemplo n.º 1
0
        private void ManageRequests()
        {
            HttpListenerContext  context  = listener.GetContext();
            HttpListenerRequest  request  = context.Request;
            HttpListenerResponse response = context.Response;

            response.AddHeader("Access-Control-Allow-Origin", "*");

            HTTPResponse httpResponse = null;
            string       responseStr  = MatchRequest(request, ref httpResponse);

            HTTPResponse.AddHTTPResponseToResponse(httpResponse, ref response);
            SendResponse(response, responseStr);
        }