2

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!

RockyMountainHigh
  • 2,871
  • 5
  • 34
  • 68
  • 1
    [How to build a query string for a URL in C#?](http://stackoverflow.com/questions/829080/how-to-build-a-query-string-for-a-url-in-c) – Chris Shouts Jun 16 '11 at 20:09
  • possible duplicate of [C# Url Builder Class](http://stackoverflow.com/questions/1759881/c-url-builder-class) – Teoman Soygul Jun 16 '11 at 20:09

1 Answers1

1

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.

Phil
  • 4,134
  • 4
  • 23
  • 40