git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1620 version bump and release notes
[jalview.git]
/
src
/
jalview
/
ws
/
HttpClientUtils.java
diff --git
a/src/jalview/ws/HttpClientUtils.java
b/src/jalview/ws/HttpClientUtils.java
index
93566f8
..
ed7288f
100644
(file)
--- a/
src/jalview/ws/HttpClientUtils.java
+++ b/
src/jalview/ws/HttpClientUtils.java
@@
-1,5
+1,5
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
* Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
* Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
@@
-43,8
+43,9
@@
import org.apache.http.impl.client.DefaultHttpClient;
/**
* Helpful procedures for working with services via HTTPClient
/**
* Helpful procedures for working with services via HTTPClient
+ *
* @author jimp
* @author jimp
- *
+ *
*/
public class HttpClientUtils
{
*/
public class HttpClientUtils
{
@@
-83,18
+84,20
@@
public class HttpClientUtils
}
public static BufferedReader doHttpMpartFilePost(String postUrl,
}
public static BufferedReader doHttpMpartFilePost(String postUrl,
- List<NameValuePair> vals, String fparm,File file, String mtype) throws ClientProtocolException,
- IOException
+ List<NameValuePair> vals, String fparm, File file, String mtype)
+ throws ClientProtocolException, IOException
{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(postUrl);
{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(postUrl);
- MultipartEntity mpe = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
- for (NameValuePair nvp:vals)
+ MultipartEntity mpe = new MultipartEntity(
+ HttpMultipartMode.BROWSER_COMPATIBLE);
+ for (NameValuePair nvp : vals)
{
mpe.addPart(nvp.getName(), new StringBody(nvp.getValue()));
}
{
mpe.addPart(nvp.getName(), new StringBody(nvp.getValue()));
}
-
- FileBody fb = new FileBody(file, mtype!=null ? mtype : "application/octet-stream");
+
+ FileBody fb = new FileBody(file, mtype != null ? mtype
+ : "application/octet-stream");
mpe.addPart(fparm, fb);
UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8");
httppost.setEntity(ue);
mpe.addPart(fparm, fb);
UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8");
httppost.setEntity(ue);
@@
-112,19
+115,22
@@
public class HttpClientUtils
return null;
}
}
return null;
}
}
+
public static BufferedReader doHttpMpartInputstreamPost(String postUrl,
public static BufferedReader doHttpMpartInputstreamPost(String postUrl,
- List<NameValuePair> vals, String fparm,String fname, InputStream is, String mtype) throws ClientProtocolException,
+ List<NameValuePair> vals, String fparm, String fname,
+ InputStream is, String mtype) throws ClientProtocolException,
IOException
{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(postUrl);
MultipartEntity mpe = new MultipartEntity(HttpMultipartMode.STRICT);
IOException
{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(postUrl);
MultipartEntity mpe = new MultipartEntity(HttpMultipartMode.STRICT);
- for (NameValuePair nvp:vals)
+ for (NameValuePair nvp : vals)
{
mpe.addPart(nvp.getName(), new StringBody(nvp.getValue()));
}
{
mpe.addPart(nvp.getName(), new StringBody(nvp.getValue()));
}
-
- InputStreamBody fb = (mtype!=null) ? new InputStreamBody(is, fname, mtype) : new InputStreamBody(is, fname);
+
+ InputStreamBody fb = (mtype != null) ? new InputStreamBody(is, fname,
+ mtype) : new InputStreamBody(is, fname);
mpe.addPart(fparm, fb);
UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8");
httppost.setEntity(ue);
mpe.addPart(fparm, fb);
UrlEncodedFormEntity ue = new UrlEncodedFormEntity(vals, "UTF-8");
httppost.setEntity(ue);