本文介绍了在Asp.NET中读取HttpRequest Post标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好专家,

我有一个链接的网站.点击链接后,它会创建下面的httpRequest并重定向到MyWebsites.点击链接后会写以下代码.

Hello expert,

I have a website which is having a link. On clicking the link it creates the below httpRequest and redirects to MyWebsites.Below code is written on click of the link.

Httprequest req = new Httprequest();
req.setEndpoint(''https://SERVWRIP/MyWebSite/'');
req.setMethod(''POST'');
req.setHeader(''latteOrgId'', loi);
req.setHeader(''open'', requestedDocument);
req.setHeader(''Content-Length'',’0’);
req.setTimeOut(200);


由于 MyWebSite 是在Asp.NET和C#中开发的,因此我需要在MyWebSite的default.aspx文件中读取http标头参数 latteOrgId open .


Since MyWebSite is developed in Asp.NET and C# thus I need to read the http header parameter latteOrgId, open in default.aspx file of MyWebSite .

推荐答案

string latteOrgId = Request.Headers["latteOrgId"];



如果有帮助,请将其标记为答案



Mark it as answer if it is helpful




这篇关于在Asp.NET中读取HttpRequest Post标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 20:07