okhttputils2

  1. Songwut K.

    Android Example B4A and PHP REST

    Thanks @Erel for free version that I plan to buy but donate instead. I'll share my B4A knowledge in Thailand, your great product must popular, later. PHP is well known for web developer, it cheap resource and easy to learn in Thailand. Backend system easy manage by PHP & MySQL but till now...
  2. C

    Android Question JSON Post, quotes in wrong place

    Hi everyone; I'm having a rough time posting a particular JSON object. The JSONParser works perfectly, but when the resulting map is posted, the quotes for the array type and JSON type end up in the wrong place, breaking the object. Sub btnSend_Click...
  3. chris_selkis

    Android Question to read html with okhttputils 2 - character encoding

    Hello, sorry for my bad English. I'm using OkHttputils2 to download a text file and read it. this file contains html code. I display this code in a webview. it works well except for the characters "éèà% .." is there a library to read this encoding correctly? or how can I do it. thank you
  4. james_sgp

    Android Question OKHTTPUTILS2 Wait For, .GetString Error

    Hi, Im using OKHTTPUTILS2 with a Wait For; and it is causing me a .GetString error saying 'File Not Found'. I`ve been searching the forum for hours but can`t seem to find a solution. Below is the code I`m using, which I copied from the example: Dim login_job As HttpJob Dim act As...
  5. KMatle

    B4J Tutorial [B4x] Exchange Data via OkHttpUtils and php (or other platforms) via lists, maps, arrays, etc.

    I made 5 examples how to exchange data between B4x apps and php. I use the POSTSTRING method as it is simple, secure (get-methods will be logged with the data autmatically on the server, post-methods not), strings can be formatted very easy (JSON) and en-/decrypted (not included but see my other...
  6. D

    Android Question Unable to resolve host using OkHttpUtils2

    I am using the following boilerplate code for OkHttpUtils2 with Wait For: Public Sub FetchData Dim myJob As HttpJob myJob.Initialize("", Me) myJob.Download("https://www.wikipedia.org/") Wait For (myJob) JobDone (myJob As HttpJob) If myJob.Success Then...
  7. trejocode

    Spanish [RESUELTO] OkHTTPUtils2 - MySQL Bloqueante

    Hola, tengo un problema es que no alcanzo a comprender del todo como "Bloquear" una petición HTTP por que utilizo Wait For (Resumable). Miren el caso: Selecciono mis elementos de mi base de datos local, y luego envío los datos a una API pero no se envían de forma apropiada por que, como es un...
  8. D

    Android Question Upload text file with OkHttpUtils2

    After successfully figuring out (with assistance here) how to download an .mp3 file from the internet, I am trying upload a .txt file to the internet. The libraries I have installed are: Core (v 8.30), OkHttp (v 1.2), RuntimePermissions (v 1.1), and StringUtils (v 1.12) I also have HttpJob and...
  9. D

    Android Question Downloading Internet files with OkHttpUtils2

    I am trying download .mp3 files from the internet. I have tried without success from two different web locations; one requiring a username and password and one that does not. In both cases I get the same error message: ***Error: javax.net.ssl.SSLHandshakeException...
  10. Brandsum

    Android Question HttpJob causing restarting paused activity

    Hi, I'm using OkHttpUtils2 for downloading some images. Problem: If I close the activity by pressing back button when it still downloading an image, the activity starts again automatically. Don't know what is happening!!! Do anyone have any solution for this problem?
  11. T

    Android Question HttpServer and download2 function question

    Hi, I’m a novice with the okHttpUtils and the HttpServer libraries, but hoping for advice please. (the libraries seem to be excellent and just what I need - if I knew how to use them!) I would like to request a series of variables (e.g.Key1, Key2) from another Android device running the...
  12. Argonc

    Android Question OkHttpUtils2 - POST with header

    How to do n B4A: curl -X POST -H "Content-Type: application/text" -d "you man" http://ec2-34-244-221-70.eu-west-1.compute.amazonaws.com:5000/ ? I try j.PostString ("http://ec2-34-244-221-70.eu-west-1.compute.amazonaws.com:5000/", "you man") but it needs a header. so I try with header j.Head...
  13. W

    Android Question OkHttpUtils2 and SSL-Problem (maybe TLS?) [SOLVED]

    Hi! I want to download a text-file from a webserver via https (unfortunally the server doesn't support http). I'm using the library: OkHttpUtils2 on Android 4.4.2 This is my code: Dim j As HttpJob j.Initialize("", Me) j.Download("https://services.swpc.noaa.gov/text/geoalert.txt") Wait For (j)...
  14. A

    Android Question Get item in string

    Hello, Can someone please send an example of how to get item from string with items? (I am using json with OkHttpUtils2) The string setting is : Dim name As List = root.Get("name") For Each colname As String In name Next (how to get for example item number 3 that equals to...
  15. A

    Android Question File not exist

    Hello, I tried to use OkHttpUtils2 to download a file from a link (trying to download file named "rec.zip") Dim d As HttpJob d.Initialize("", Me) d.Download(link) Wait For (d) JobDone(d As HttpJob) If d.Success Then If...
  16. A

    Android Question [solved] Json file password

    Hello, I tried to use OkHttpUtils2 with json, the file adress have a key/password to get to the data. I used j.password = but The Log result is: "ResponseError. Reason: Unauthorized, Response: {"message":"Need to provide a secret-key to READ private bins","success":false}" Sub...
  17. KMatle

    B4J Tutorial Updated MySQL & PHP example

    Before you start: You need some experience with php, Apache Servers, OkHttpUtils, Lists, Maps and JSON structures. This is an updated example of how to - communicate with a apache server via OKHttpUtils calling a php script - doing MySQL data requests (Insert, Update and Delete) using...
  18. TIMX

    Android Question Attempt to write to field 'boolean anywheresoftware.b4a.samples.httputils2.httpjob._success'

    Hi, Please I need some lights, I include the resumable subs to get register from remote database, but the problem persist. Exactly occurs when I click on Login from Main Activity to navigate to ModPrincipal and I click egain on return key an wait 30 seconds in Main Activity then exception...
  19. juniorteacher

    Android Question No Error but No File Uploaded,use PostMultipart

    I Follow Tutorial https://www.b4x.com/android/forum/threads/upload-image-to-server-postmultipart-and-php.82682/#post-525412 No error but no fileuploaded here is my project thanks for help, solved
  20. cesarcm

    Android Question "message": "Request must have \"Content-Type: application/json\" header"

    Hi all, Please, HELP ME! I am getting the error below using job.PostString(link, data) I am using B4A v8.00 and OkHttpUtils2 (v2.61) ResponseError. Reason: UNSUPPORTED MEDIA TYPE, Response: { "message": "Request must have \"Content-Type: application/json\" header" } Source-code: ...
Top