Comments (7)
I'm not sure this code make sense:
params.put("playlist[vid][]", "123");
params.put("playlist[vid][]", "456");
This would seem to override the "123" value inserted with "456" since you are using the same key for both ("playlist[vid][]").
from http-request.
For example number 2 have you tried:
File upload = new File(Environment.getExternalStorageDirectory() + "/testupload/up.mp4");
req.part("content[name]", upload, null, "video/mp4");
using this api.
from http-request.
Hi kevinsawicki,
is that ,
Map params = new HashMap();
params.put("playlist[name]", "testNewPlaylist");
params.put("playlist[vid][]", "123");
params.put("playlist[vid][]", "456");
equals to this?
List nameValuePairs = new ArrayList();
nameValuePairs.add(new BasicNameValuePair("devices[]", device1));
nameValuePairs.add(new BasicNameValuePair("devices[]", device2));
nameValuePairs.add(new BasicNameValuePair("devices[]", device3));
This method it works! req.part("content[name]", "up.mp4", "video/mp4", upload);
i had faced some issue, that is how to i get the progress % for downloading/uploding, because i want to let user know how many % been progress.
Now i do this for download,
while ((count = input.read(data)) != -1) {
if (isQuitting()) { input.close(); rav.close(); return cancelled().add("result", "downlaod canceled"); }
total += count;
rav.write(data, 0, count);
if ((fileLength + downloadFile.length()) > 0) updateProgress((int) ((total + downloadFile.length()) * 100 / (fileLength + downloadFile.length())));
}
There is any method to get progress of upload and download, that i can reduce my codes.
Sorry for many questions.
Really big thanks to you, it great helps to me.
from http-request.
Progress should be merged in soon and will be in the next release, #47
from http-request.
Hi kevinsawicki,
Sure, i'll wait for next release , big thanks to you and this lib 👍
from http-request.
Okay, I'm going to close this issue out then since it seems like all the questions were answered, please open a new issue if you have any problems or other questions.
from http-request.
Sure no problem! thanks kevinsawicki. 👍
from http-request.
Related Issues (20)
- How do I add request headers? I saw the accept method which is expecting a string, but I need to add new key,value pairs for headers HOT 3
- MOBILE TOP 10: M5-INSUFFICIENT CRYPTOGRAPHYMOBILE
- Accessing the headers of a request, without starting a connection
- Parameter value contains the character # HOT 1
- How to send request with client certificate ? (not globally configured for every request)
- Support of digest authentication
- how to GET with cookie in headers?
- how to make a http request with session? HOT 1
- "Exception in thread "main" java.lang.IllegalStateException" when useProxy
- project status in 2020
- Correcion en peticiones por GET
- option to log the request and the responses HOT 1
- cannot post multi-part with file HOT 1
- java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required
- java.io.IOException: Premature EOF
- java.lang.IllegalStateException: Already connected
- hope to support HTTP2.0
- Add pkcs12 certificate to autenticate
- CVE-2019-1010206 HOT 2
- It is recommeded to use `java.net.http.HttpClient` with JDK11 or higher.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-request.