C#HTTP请求解析器 [英] C# HTTP Request Parser

查看:363
本文介绍了C#HTTP请求解析器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
将原始HTTP请求转换为HTTPWebRequest对象

Possible Duplicate:
Converting Raw HTTP Request into HTTPWebRequest Object

我有一个用C#编写的自定义HTTP服务器,它为我提供了原始HTTP请求...

I've got a custom HTTP server written in C# which gives me the raw HTTP request...


GET /ACTION=TEST HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

.NET框架中是否有可以用来解析它的东西,还是我必须手工完成?

Is there something in the .NET framework that I can use to parse it or do I have to do it by hand?

欢呼

推荐答案

Looks like this question has been asked before here. Apparently there is no built-in way to do it.

这篇关于C#HTTP请求解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆