My preferred way is this. It handles the escaping and parsing for you.
WebClient webClient = new WebClient();
webClient.QueryString.Add("param1", "value1");
webClient.QueryString.Add("param2", "value2");
string result = webClient.DownloadString("http://theurl.com");
More Related Contents:
- How to make an HTTP POST web request
- The request was aborted: Could not create SSL/TLS secure channel
- How to ignore the certificate check when ssl
- send HTTP POST request in .net
- How do I use WebRequest to access an SSL encrypted site using HTTPS?
- Adjusting HttpWebRequest Connection Timeout in C#
- The server committed a protocol violation. Section=ResponseStatusLine ERROR
- How to properly make a http web GET request
- HttpWebRequest is extremely slow!
- JQuery ajax call to httpget webmethod (c#) not working
- Is it possible to transfer authentication from Webbrowser to WebRequest
- HttpWebRequest not passing Credentials
- What difference is there between WebClient and HTTPWebRequest classes in .NET?
- C# – HttpWebRequest POST (Login to Facebook)
- How do I see the raw HTTP request that the HttpWebRequest class sends?
- Does .NET’s HttpWebResponse uncompress automatically GZiped and Deflated responses?
- Send JSON via POST in C# and Receive the JSON returned?
- C# keep session id over httpwebrequest
- Add custom header in HttpWebRequest
- HttpWebRequest times out on second call
- C# httpwebrequest and javascript
- Setting a WebRequest’s body data
- How to get error information when HttpWebRequest.GetResponse() fails
- GetResponseAsync does not accept cancellationToken
- How to make my web scraper log in to this website via C#
- Receiving JSON data back from HTTP request
- C# HttpWebRequest The underlying connection was closed: An unexpected error occurred on a send
- HttpWebRequest: The request was aborted: The request was canceled
- WWW/UnityWebRequest POST/GET request won’t return the latest data from server/url
- Why does HttpWebRequest throw an exception instead returning HttpStatusCode.NotFound?