I need to add some custom headers to the HttpWebRequest
object. How can I add Custom Header to HttpWebRequest
object in Windows Phone 7.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You can add values to the HttpWebRequest.Headers collection.
According to MSDN, it should be supported in windows phone: http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.headers%28v=vs.95%29.aspx
A simple method of creating the service, adding headers and reading the JSON response,
You use the
Headers
property with a string index:According to MSDN, this has been available since:
https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.headers(v=vs.110).aspx