0

I am new on android programming and i have to create an HTTPS request to a server on my app. This server has his own certificated and is signed by VeriSign.

I read information about how to create a HTTPS request with android but all with certificated self signed or something similar. Apart from that, I have to use a username and password on that connection and I don't found any information about it.

I read here information about it, but I really don't understand the process about what I have to do.

Can anyone explain me how I have to send the request?

Community
  • 1
  • 1
Fernando
  • 349
  • 2
  • 6
  • 21

1 Answers1

0

If your server has a certificate signed by a certificate authority like verisign, you shouldn't do any additional stuff when making a request. Apart putting an s to https of your url, of course.

EDIT :

CredentialsProvider credProvider = new BasicCredentialsProvider();
credProvider.setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT),
    new UsernamePasswordCredentials("username", "password"));

DefaultHttpClient http = new DefaultHttpClient();
http.setCredentialsProvider(credProvider);
lukasz
  • 3,121
  • 1
  • 21
  • 20