Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 27
Registered: ‎04-05-2011
My Device: playbook
My Carrier: moblie app developer

how to make https post request in playbook

i Would like to ask how to make https post request in playbook?
I has try to use HTTPSERVICE , but it only work in http...

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: how to make https post request in playbook

I see various examples (searching via Google) of HTTPService being used with https sites, and comments in articles indicating it's possible. Maybe you should describe what errors or other results you're getting that suggest to you it won't work. Also maybe post some sample code.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 15
Registered: ‎04-06-2011
My Device: Bold
My Carrier: Rogers

Re: how to make https post request in playbook

I use https calls in 2 of my apps currently without issue. The only problem i have is that we arent given an option to ignore unsigned certs.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: how to make https post request in playbook

@uhohhotdog, do you mean self-signed certificates, or maybe invalid ones (e.g. expired), or is there really such a thing as an "unsigned certificate"?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 15
Registered: ‎04-06-2011
My Device: Bold
My Carrier: Rogers

Re: how to make https post request in playbook

Yes sorry, by unsigned i do me self-signed. Do you know of a way for the popup on the playbook to be suppressed and auto accepting them?
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: how to make https post request in playbook

@uhohhotdog, who would be using this, that you think would be happy not to see the certificate dialog for a self-signed certificate?

 

If it's for internal corporate use, for example, then you would likely want to arrange to install your own root certificate, which can (at least in other systems, and possibly on the PlayBook) be self-signed, and then you use that to sign certificates for various servers within the organization.  This would be for internal use only though, and all it's doing is establishing a trust chain the same way as RIM has done with the pre-installed root certificates, only it's the organization which is choosing to trust its own root certificate.

 

For anyone other than yourself, I'm not sure those users would want you to be able to suppress that dialog.  I assume it's there to protect them from various kinds of attack, and since you aren't willing (?) to pay for a properly signed certificate to prove your server's identity, the dialog is there to let them explicitly choose to trust you, or not.  What's the use case for suppressing it?


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 15
Registered: ‎04-06-2011
My Device: Bold
My Carrier: Rogers

Re: how to make https post request in playbook

@peter9477, i have no issue with the user seeing it, however and this could be my own problem with my code, any time you launch the app and it wants to make a call to the HTTPS server that pop up will alert the user. There is no check box or setting to have it ignored after you accepted it once, like you can do in firefox/chrome/etc browsers.

For example what i was hoping for was something along the lines of how we can do it in iOS: http://stackoverflow.com/questions/933331/how-to-use-nsurlconnection-to-connect-with-ssl-for-an-untr...

Thanks
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: how to make https post request in playbook

Interesting... any possibility that adding the <action>manage_certificates</action> permission to your blackberry-tablet.xml file will magically give the dialog the "Always trust <domain name>" checkbox that you can see in the equivalent dialog in the browser?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 15
Registered: ‎04-06-2011
My Device: Bold
My Carrier: Rogers

Re: how to make https post request in playbook

unfortunately that didnt work, when relaunching the application and making a connection i am always asked (once) to accept/reject the cert.