I'm using the WebRequest class to make a request to some site. The query string contains a slash (/), which cause to the url to be cut by the site, because it doesn't see it as part of the query string.
The query string is: "my params / separated by slash".
The request:
var request = WebRequest.Create("http://www.somesime.com/q-my+params+%2f+separated+by+slash");
What I missing?
EDIT: After all answers here are update:
I was wrong about query string, it's not actually query string, but the url should look (without "?"):
"http://www.somesime.com/q-my+params+%2f+separated+by+slash"
The url "http://www.somesime.com/q-my+params+%2f+separated+by+slash" is result of Server.UrlEncode method. The code:
var url = "http://www.somesime.com/q-" + Server.UrlEncode(@"my params / separated by slash");
EDIT 2: If I place the resulting url into a browser, everything works. But if I run it through WebRequest class, the url results as it was called without "/ separated by slash" part