I think you need to do some research on what REST is. You are kind of on the right track with your code. I will try to explain REST to you because I have worked with it religiously this year...
Think of REST as just a "fancy word" meaning for two websites to communicate with one another. When a website/application supports REST, it means that you can send requests to it (either POST or GET) and it will return data. Data returned from a REST call is typically in a format like XML or JSON format (in fact, it's kind of the "standard" that it be returned in JSON format). REST almost never returns anything like plain text data, it is usually formatted as I just explained.
Your code, I'm not sure you are on the right track. If you were sending a request to a REST application, you would need to created a web request. In this web request, then change the header type to GET or POST depending on what the application supports. See here:
https://msdn.microsoft.com/en-us/library/debx8sh9(v=vs.110).aspx
When you work with web request, it's just another fancy term for "web browser". Think of web request as a browser. You can read and parse all the data on a page and communicate with it as a web browser would. On the other hand, if someone asked you to write something that supports a REST request, you would write something that accepts variables in either POST or GET. Does that make more sense?