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

Status
Not open for further replies.

Magma

Expert
Licensed User
Longtime User
Hi there,

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

using:
B4X:
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
 

Magma

Expert
Licensed User
Longtime User
So from server side must use that:

B4X:
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... ?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
not getting the right values i want from server handle...

B4X:
    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 >?
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…