[英]Why my wcf service request headers always get
Work on wcf project,my service request headers why always become get ,even I request for post. 在wcf项目上工作,我的服务请求标题为什么总是得到,甚至我要求发布。
Bellow is my fiddler out put 贝娄是我的小提琴手
My post request 我的帖子请求
result 302 responce 结果302响应
result 405 responce 结果405回应
What to do? 该怎么办? why my service behave strange way?
为什么我的服务行为奇怪?
This happens due to the redirection from the first url. 这是由于从第一个URL重定向而发生的。 Redirected requests are GET by nature and here the redirection is targeted to a url that accepts only POST.
重定向的请求本质上是GET,这里重定向的目标是只接受POST的URL。 In this case hitting the second url(the redirection target) using POST method solves the problem.
在这种情况下,使用POST方法命中第二个url(重定向目标)可以解决问题。
Now, as you say redirection is mandatory, one way to do that is to make the new URL allow GET and pass a encrypted token containing the useful parameters as a query string parameter. 现在,正如您所说的重定向是强制性的,一种方法是使新URL允许GET并将包含有用参数的加密令牌作为查询字符串参数传递。 This way you can get both: 1. encryption makes the second url secure and 2. you can pass the parameters to the new url without exposing them in the query-string.
通过这种方式,您可以同时获得:1。加密使第二个URL安全; 2.您可以将参数传递给新URL而不将它们暴露在查询字符串中。
Hope it helps. 希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.