Magma Expert Licensed User Longtime User May 6, 2019 #1 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
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
DonManfred Expert Licensed User Longtime User May 6, 2019 #2 Use Postmultipart Last edited: May 6, 2019 Upvote 0
Magma Expert Licensed User Longtime User May 7, 2019 #3 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
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... ?
Erel B4X founder Staff member Licensed User Longtime User May 7, 2019 #4 Magma said: Will that slow my server - wait for 900kb every time or is nothing to do with that? Click to expand... This is the maximum accepted size. It doesn't wait for it. Upvote 0
Magma said: Will that slow my server - wait for 900kb every time or is nothing to do with that? Click to expand... This is the maximum accepted size. It doesn't wait for it.
Magma Expert Licensed User Longtime User May 7, 2019 #5 ok, i will try it... Thank you all for the answers! Upvote 0
Magma Expert Licensed User Longtime User May 7, 2019 #6 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
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 >?
Erel B4X founder Staff member Licensed User Longtime User May 7, 2019 #7 There are many mistakes in this short code. Start with: https://www.b4x.com/android/forum/threads/postmultipart-handle-on-b4j-server.103487/#post-648633 Part: https://www.b4x.com/b4j/help/jserver.html#part For further discussion please start a new thread in B4J questions forum. Upvote 0
There are many mistakes in this short code. Start with: https://www.b4x.com/android/forum/threads/postmultipart-handle-on-b4j-server.103487/#post-648633 Part: https://www.b4x.com/b4j/help/jserver.html#part For further discussion please start a new thread in B4J questions forum.