Last active
July 31, 2017 16:13
-
-
Save AlphaFactory/8682577 to your computer and use it in GitHub Desktop.
Old Multipart Upload
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
//MultipartEntity 객체 선언 | |
//boundaryString은 Multipart 업로드시 사용할 임의의 String값 | |
//charset은 자바에서 기본적으로 사용할 수 있는 Charset 객체 | |
MultipartEntity reqEntity | |
= new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE, boundaryString, charset); | |
//tempString을 StringBody 객체에 넣고 MultipartEntity에 넣음 | |
reqEntity.addPart("part", new StringBody(tempString)); | |
//HttpPost에 삽입 | |
httppost.setEntity(reqEntity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment