Skip to content

Instantly share code, notes, and snippets.

@AlphaFactory
Last active July 31, 2017 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlphaFactory/8682577 to your computer and use it in GitHub Desktop.
Save AlphaFactory/8682577 to your computer and use it in GitHub Desktop.
Old Multipart Upload
//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