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
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 = ""; |
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
/* | |
* Copyright (C) 2014 skyfish.jy@gmail.com | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |