Android Question How to use PostMultipart method of HttpUtils2 lib

JNG

Member
Licensed User
Hi!
I am bit confused regarding below matter ;

1. Am using HttpUtils2 library.

2. Initially I am using Download2 method as below

Sub GetData
Dim FillData As HttpJob

FillData.Initialize("GetData", Me)
FillData.Download2("http://www.jangum.com/fetch.php",ArrayAsString ("action","FillData","Var1", _ Value1,"Var2",Value2,"Var3", Value3,"Var4",Value4,"CurDate",CurrentDate, ,"Data",String))

ProgressDialogShow("Preparing Data Pl. Wait .......")

EndSub

3. Now I want to use more secure New method PostMultipart of HttpUtils2 library



My problem is how to write the above sub using PostMultipart method and how to define contentType ( set header). I may be misunderstanding this . Pl advise.

regards
Jng
 

JNG

Member
Licensed User
Writing mistake I am using OKHttpUtils2 only.

Pl. clarify weather we need to define Content Type(Set header ) for (Map variable )which is required in POST method ?????? AN HOW

Can file type be JSON string file as this
Dim fd As MultipartFileData
fd.Initialize
fd.KeyName = "file"
fd.Dir = ..PATH 'File.DirAssets
fd.FileName = "JsonData"
fd.ContentType = "application/Json"
 
Upvote 0

Oswald

Member
Licensed User
Longtime User
Hi Erel,
what is the static string "---------------------------1461124740692" in HttpJob?
What happens if I change It?
BR
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…