Android Question HTTPS and POST requests

LoZio

Member
Licensed User
Longtime User
Hi,
I'm wondering between httpclient and httpjob in utilsv2.
httpclient has a "InitializeAcceptAll" method, is old stuff and only supports get requests.
HttpJob is newer, accepts post request but offloads the SSL stuff to the OS, so no "AcceptAll" method.
Both support basic encryption.

What should I use to POST to Web service with self-signed cert usiing basic auth? E.g., calling a aimple web service.
Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
httpclient has a "InitializeAcceptAll" method, is old stuff and only supports get requests.
HttpJob is newer, accepts post request but offloads the SSL stuff to the OS, so no "AcceptAll" method.
Both support basic encryption.
I'm afraid to say that all of these statements are incorrect.

1. HttpClient.InitializeAcceptAll works with all requests.
2. HttpJob is not newer. It is a small framework built over HttpClient.

Your best option is modify HttpUtils2Service and make it call hc.InitializeAcceptAll instead of hc.Initialize.
 
Upvote 0

LoZio

Member
Licensed User
Longtime User
I rewrote my inner workings with httpclient directly.
It would be very useful to export "InitializeAcceptAll" into HttpJob without rewriting classes, since it is already in httpclient.
Bye
 
Upvote 0
Top