Skip to content

Instantly share code, notes, and snippets.

View ZengruiWang's full-sized avatar

ghostfacechillah ZengruiWang

  • Hulu, LLC
  • Los Angeles, CA, USA
View GitHub Profile
@ZengruiWang
ZengruiWang / multipart.java
Created March 22, 2016 22:34 — forked from mcxiaoke/multipart.java
multipart request using httpurlconnection
public String multipartRequest(String urlTo, String post, String filepath, String filefield) throws ParseException, IOException {
HttpURLConnection connection = null;
DataOutputStream outputStream = null;
InputStream inputStream = null;
String twoHyphens = "--";
String boundary = "*****"+Long.toString(System.currentTimeMillis())+"*****";
String lineEnd = "\r\n";
String result = "";
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master