Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Experimentation for Engineers: From A/B testing to Bayesian optimization
this week in the
Design
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Android
send parameters with HttpGet request
shawn peter
Ranch Hand
Posts: 1325
1
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i need to check login details .So how to send user name as a parameter to the web service.
below is my service which is currently getting all login information as a xml file.I need to send user name and get the password of user.
public String readservicedata() { StringBuilder builder = new StringBuilder(); HttpClient client = new DefaultHttpClient(); HttpGet httpGet = new HttpGet( "http://172.22.221.104:9763/services/vSchedule.HTTPEndpoint/alldataOperation"); try { HttpResponse response = client.execute(httpGet); StatusLine statusLine = response.getStatusLine(); int statusCode = statusLine.getStatusCode(); if (statusCode == 200) { HttpEntity entity = response.getEntity(); InputStream content = entity.getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(content)); String line; while ((line = reader.readLine()) != null) { builder.append(line); } } else { Log.e(shiftActivity.class.toString(), "Failed to download file"); } } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return builder.toString(); }
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to call web service with parameter
i am getting HttpHostConnectException
getting Nulpointer in xml file parsing
what is this UnknownHostException(mssql server 2008r2)
Any way to overcome Circular Redirect using HttpClient 4.1.1
More...