amitshekhariitbhu / Fast-Android-Networking

🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
https://outcomeschool.com
Apache License 2.0
5.71k stars 960 forks source link

need json object on .upload type #575

Open yogithesymbian opened 2 years ago

yogithesymbian commented 2 years ago

same issue : https://github.com/amitshekhariitbhu/Fast-Android-Networking/issues/386 AND https://github.com/amitshekhariitbhu/Fast-Android-Networking/issues/226

the first rule : i can't access the backend version 2. my backend version 1 didnt have marks and its work properly, but on update their added object request.

the backend need object request for example

{
  "file": file,
  "track": "bali",
  "marks" : [ // these the marks what i mean .
      {
          id: 1,
          name: "yogi"
       }
   ]
}

i have use .toString and toTypedArray but get an errors, the server cant accept the request.

.addMultipartParameter("track", data.track)
.addMultipartParameter("marks", data.marks.toString())
.addMultipartFile("file", file)

anyone have solution with this FAN Library ?