Https returns 404 with DefaultHttpClient on Android?

Read Time:34 Second


I have an http request that worked as and now I have been asked to use

The former works and the later fails with a Network I/O error. Are there any missing parameter settings that I need for the client?


Https almost always implies a different port being used (standard http=>80; standard https=>443). You have a hardcoded port (8151). I’m guessing the https servlet is listening on a different port.


Hardcode HTTPS port number after the url.

For example:

private static final String URL = “”;

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.