Created
May 27, 2015 11:27
-
-
Save fedotxxl/a96b2562da2350bba7e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client client = ClientBuilder.newBuilder() | |
.register(MultiPartFeature.class) | |
.build(); | |
WebTarget target = client.target(config.getFilePath(id)); | |
StreamDataBodyPart filePart = new StreamDataBodyPart("file", new FileInputStream(archiveFiles(files)), "a.zip"); | |
MultiPart multipart = new FormDataMultiPart().bodyPart(filePart); | |
response = target.request(MediaType.APPLICATION_JSON_TYPE).post(Entity.entity(multipart, multipart.getMediaType())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment