1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question [SOLVED] OkHttpUtils2 and Poststring - special characters?

Discussion in 'Android Questions' started by Magma, May 6, 2019.

Thread Status:
Not open for further replies.
  1. Magma

    Magma Well-Known Member Licensed User

    Hi there,

    when i am having 2,3 simple parameters...

    using:
    Code:
    job1.PostString("https://" & myserver & "/postdata""new=new&vehicle=" & vehicle & "&user=" & user & ")"
    and all good... but if in my parameters have special characters?

    vehicle="12%%&213&asw"
    user="$%#@!^&%^&@$#!@!@@"

    how can i pass them ?

    Thanks in advance
     
  2. DonManfred

    DonManfred Expert Licensed User

    Use Postmultipart
     
    Last edited: May 6, 2019
    Magma likes this.
  3. Magma

    Magma Well-Known Member Licensed User

    So from server side must use that:

    Code:
    Dim data As Map = req.GetMultipartData(Main.TempDir, 900000
    'if max of my sending data is 900kb...
    Will that slow my server - wait for 900kb every time or is nothing to do with that?

    Because sometimes will be 1kb or 10kb... or 800kb... but i am sure that i must put the max limit... ?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    This is the maximum accepted size. It doesn't wait for it.
     
    Magma likes this.
  5. Magma

    Magma Well-Known Member Licensed User

    ok, i will try it...

    Thank you all for the answers!
     
  6. Magma

    Magma Well-Known Member Licensed User

    not getting the right values i want from server handle...

    Code:
    Dim data As Map = req.GetMultipartData(File.DirApp, 10000'max 10kb
        For k=1 To data.Size-1
            
    Log(data.GetKeyAt(k) & "=" & data.GetValueAt(k))
        
    Next
    log:
    user=Part{n=user,fn=null,ct=null,s=28,t=true,f=null}
    ....
    ....

    As i can think map is handling objects... and trying to get text/string from it... can have any help how i can convert object to strings... - is this my problem and how i will >? o_O
     
  7. Erel

    Erel Administrator Staff Member Licensed User

Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice