Android Question CURL syntax with Basic Auth

Daniel-White

Active Member
Licensed User
Longtime User
Hi guys, I am exploring how will be the syntax of this curl to something like httputils2 ,httpjob or similar B4A.

curl -X DELETE --user username : password http://exampleweb.test.com/posts/1

I have problem about how tell to the web using B4A , the "DELETE" and how give to the website the username and password.

the http://exampleweb.test.com/posts/1 is a json

the auth is basic that mean base 64 encode.

Thanks you Indeed.
Daniel W
 
Last edited:

Daniel-White

Active Member
Licensed User
Longtime User
Thanks you Indeed Erel, one question for everybody here, when use the credentials in httputils2 "To send credentials you should set Job.UserName and Job.Password fields before sending the request." I read from https://www.b4x.com/android/forum/t...-services-are-now-even-simpler.18992/#content it will need to encode with base64? or it is done?, I use my sniffer when run curl, and see the credentials example username : password like this example daniel:123 in plain text and the encoding in 64 is like this ZGFuaWVsOjEyMw==

I am trying to do the same with B4A , I did with curl, the web is wordexpress. and I am little bit confuse with username : password and base64, it will be a header? how format that in B4A. I read a similar code here https://www.b4x.com/android/forum/threads/i-need-help-with-pushbullet-api.38520/#post-228254, but I did not see the base 64 for basic auth.
Thanks
 
Upvote 0
Top