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 5928003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:14:35+00:00 2026-05-22T14:14:35+00:00

AFAIK HttpURLConnection doesn’t actually send the request out until we attempt to read the

  • 0

AFAIK HttpURLConnection doesn’t actually send the request out until we attempt to read the input. However, if an exception happens here I can’t differentiate between the case where the request was not sent, and the case where the request was sent but some other sort of error occurred (maybe we entered a tunnel so couldn’t receive the response).

Is there a way to query and find out if the request was actually sent or not?

  • 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-05-22T14:14:36+00:00Added an answer on May 22, 2026 at 2:14 pm

    You might have some luck with

    URL url = new URL(serverUrl);
    connection = (HttpURLConnection) url.openConnection();
    // write to connection output stream (don't forget to flush())
    connection.getResponseCode();
    

    You can get a full list of response codes at http://download.oracle.com/javase/1,5.0/docs/api/java/net/HttpURLConnection.html

    Having said that I can imagine your data going out completely an instant before you enter a tunnel and the connection not having a response code set, in which case you would try to send again (perhaps using a unique ‘send id’) so that the listener knows to ignore you resend but can still let you know that it was received.

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

Sidebar

Related Questions

AFAIK: A http POST request is sent to apache, then piped through stdin and
AFAIK with XmlHttpRequest I can download and upload data just with the send method.
AFAIK sizeof doesn't evaluate its operands it C++. E.g. int x = 0; sizeof(x
AFAIK one of the objectives of Stack Overflow is to make sure anyone can
AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because
AFAIK ROWID in Oracle represents physical location of a record in appropriate datafile. In
AFAIK, extern keyword should be used for declaration and no value can be associated
AFAIK, for pointers/references static_cast, if a class definition is not visible to compiler at
Afaik, you can change/manipulate browser settings in Mozilla/Netscape browsers. For Instance netscape.security.PrivilegeManager.enablePrivilege('someprivilege'); Of course
The program below prints: my name is:null my name is:null Someclass static init AFAIK

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.