Advertisement
Guest User

Untitled

a guest
Mar 24th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. [OperationContract]
  2. [WebInvoke(Method = "GET",
  3. BodyStyle = WebMessageBodyStyle.WrappedRequest,
  4. UriTemplate = "/MobileLoginUser?username={username}&password={password}")]
  5. string MobileLoginUser(string username,string password);
  6.  
  7. HttpGet request = new HttpGet("http://something.com/MobileLoginUser?username="+params[0]+"&password="+params[1]);
  8. request.setHeader("Accept", "application/json");
  9. request.setHeader("Content-type", "application/json");
  10. DefaultHttpClient httpClient = new DefaultHttpClient();
  11. HttpResponse response = httpClient.execute(request);
  12. HttpEntity httpEntity = response.getEntity();
  13. userDetail = EntityUtils.toString(httpEntity);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement