Daniel-White Active Member Licensed User Longtime User Jul 2, 2015 #1 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: Jul 2, 2015
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
Erel B4X founder Staff member Licensed User Longtime User Jul 2, 2015 #2 Use HttpUtils2 source code instead of the library and add this sub to HttpJob: Code: Public Sub Delete(Link As String) req.InitializeDelete(Link) CallSubDelayed2(HttpUtils2Service, "SubmitJob", Me) End Sub Upvote 0
Use HttpUtils2 source code instead of the library and add this sub to HttpJob: Code: Public Sub Delete(Link As String) req.InitializeDelete(Link) CallSubDelayed2(HttpUtils2Service, "SubmitJob", Me) End Sub
Daniel-White Active Member Licensed User Longtime User Jul 2, 2015 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Jul 2, 2015 #4 Basic authentication doesn't require the password to be base 64 encoded. You can use StringUtils to encode it. Upvote 0
Basic authentication doesn't require the password to be base 64 encoded. You can use StringUtils to encode it.