RockyMountainHigh
RockyMountainHigh

Reputation: 3021

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 parameter. 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!

Upvotes: 2

Views: 1248

Answers (1)

Phil
Phil

Reputation: 4224

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.

Upvotes: 1

Related Questions