How to up/download huge files with Feign?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
I have to up/download huge files, bigger then fits into memory.
For the download I could use the Response object as it gives me the
(hopefully) unbuffered input stream. But how could I send big data
within a request.
I would like to avoid multipart files or similar. I would like to push the
binary data direct behind the request object.
Ideally, I would like to be able to stream data from a response object to a request object without
the need to write it into the file system.
Currently, I got stuck with the upload part. The encoder expects that I write the data either as string or byte[]
into the RequestTemplate. Is there no way to attach there an output stream?
Thanks,
Dieter
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how RequestTemplate and the encoder currently accept String or byte[]; compare that with the Response object's input-stream path. Done means the requested upload and response-to-request streaming behavior works without buffering the data in memory or writing it to the filesystem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100