Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8015925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:23:59+00:00 2026-06-04T20:23:59+00:00

I use the following code to send request to the server: HttpClient httpclient =

  • 0

I use the following code to send request to the server:

HttpClient httpclient = new DefaultHttpClient();
httpclient.getCredentialsProvider().setCredentials(
                new AuthScope("localhost", 8080),
                new UsernamePasswordCredentials("username", "password"));

HttpHost targetHost = new HttpHost("www.myhost.com", 443, "https");
targetHost .setHeader("Accept-Language", "en-us,en;q=0.5");
targetHost .setHeader("Accept-Encoding", "gzip,deflate");
targetHost .setHeader("Accept-Charset","ISO-8859-1,utf-8;q=0.7,*;q=0.7");
StringEntity se = new StringEntity(myRequestData, "UTF8");
se.setContentType("text/xml");
se.setContentEncoding("gzip,deflate");
targetHost .setEntity(se);
httpclient.excute(targetHost);

The problem is I want to see exactly what I send to server (header, data…) and the response package from server. I know Wireshark maybe help but I don’t know how to use it for my android code. I need some examples or tutorial to do it or maybe has another solution. Thanks in advance!

P/S: I don’t have the administrator right and cannot control the server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:24:00+00:00Added an answer on June 4, 2026 at 8:24 pm

    Sure, learning how to use Wireshark won’t hurt. If you’ve got the time there’s a lot of learning materials on the project’s site, including videos.

    If you’re pressed for time ‘though, and especially because you’re connecting over SSL, I think it would be faster to implement a “dummy” server that prints whatever it receives, and point your Android code to connect to it. Here’s a refresher on server-side sockets in Java. You can also get the actual server’s response from the execute’s method return value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code which I use to send a request to the
Whenever I use the following code, the webserver (running IIS 7) refuses to send
I`m trying to send e-mail via c# and use the following code: public static
I'm facing an odd behavior. I use the following code to send an HTTP
I use following code: Create a retry policy, when error, retry after 1 second,
I use VS2010, C# to develop Silverlight 4 app, I use following code in
I have an array of objects, and i use following code to get in
To find form element from the element which triggered event. I use following code.
I use the following code to display RSS news topic and summary, it works
I use the following code to save password in a txt file: String FILE_NAME=lol.txt;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.