开发者

Adding querystring to REST GET

I am trying to create a GET request to a REST webservice that reuires an Authorization token as a querystring param开发者_运维百科eter. So, The request needs to be in the format:

http://endpoint.com/action/resource?Auth=12345

I am drawing a blank as how to add the querystring to my HttpWebRequest without just building a string. Is there another (read: better) option?

Thanks in advance!


QueryString Builder class is good and has a fluent interface.

Also UrlBuilder class on CodeProject. Similar to System.UriBuilder has better support for working with the QueryString.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜