How can I send ‘get’ request from the server to API and get result with json data?
I heard about HTTPClient in .net 4.5 maybe there is something like that in .net 4.0?
How can I send ‘get’ request from the server to API and get result
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For older Framework version You can use either WebClient which is really simple class for downloading/uploading data, or use HttpWebRequest. WebRequest is lower level, but You can define method(GET,POST), UserAgent etc. Here You can find example about using WebRequest to do POST.
If You just want to get returned JSON from adress, WebClient should be sufficent.