Class HttpUtilsExtensions
- java.lang.Object
-
- it.geosolutions.geonetwork.util.HTTPUtils
-
- org.gcube.spatial.data.geonetwork.extension.HttpUtilsExtensions
-
public class HttpUtilsExtensions extends it.geosolutions.geonetwork.util.HTTPUtils
-
-
Constructor Summary
Constructors Constructor Description HttpUtilsExtensions()HttpUtilsExtensions(String userName, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandelete(String arg0)booleanexists(String arg0)Stringget(String arg0)StringgetJSON(String url)intgetLastHttpStatus()booleanhttpPing(String arg0)Stringpost(String url, File file, String contentType)Stringpost(String url, InputStream content, String contentType)Stringpost(String url, String content, String contentType)Stringpost(String arg0, String arg1, String arg2, String arg3)Stringpost(String url, org.apache.commons.httpclient.methods.RequestEntity requestEntity)StringpostXml(String url, InputStream content)StringpostXml(String url, String content)StringpostXml(String url, String content, String encoding)Stringput(String url, File file, String contentType)Stringput(String arg0, String arg1, String arg2)Stringput(String url, org.apache.commons.httpclient.methods.RequestEntity requestEntity)StringputJSON(String url, String content)StringputXml(String url, String content)protected voidsetAuth(org.apache.commons.httpclient.HttpClient client, String url, String username, String pw)
-
-
-
Method Detail
-
getJSON
public String getJSON(String url) throws MalformedURLException, it.geosolutions.geonetwork.exception.GNServerException
- Throws:
MalformedURLExceptionit.geosolutions.geonetwork.exception.GNServerException
-
putJSON
public String putJSON(String url, String content) throws UnsupportedEncodingException, it.geosolutions.geonetwork.exception.GNServerException
- Throws:
UnsupportedEncodingExceptionit.geosolutions.geonetwork.exception.GNServerException
-
setAuth
protected void setAuth(org.apache.commons.httpclient.HttpClient client, String url, String username, String pw) throws MalformedURLException- Throws:
MalformedURLException
-
getLastHttpStatus
public int getLastHttpStatus()
- Overrides:
getLastHttpStatusin classit.geosolutions.geonetwork.util.HTTPUtils
-
delete
public boolean delete(String arg0)
- Overrides:
deletein classit.geosolutions.geonetwork.util.HTTPUtils
-
exists
public boolean exists(String arg0)
- Overrides:
existsin classit.geosolutions.geonetwork.util.HTTPUtils
-
get
public String get(String arg0) throws MalformedURLException
- Overrides:
getin classit.geosolutions.geonetwork.util.HTTPUtils- Throws:
MalformedURLException
-
httpPing
public boolean httpPing(String arg0)
- Overrides:
httpPingin classit.geosolutions.geonetwork.util.HTTPUtils
-
post
public String post(String arg0, String arg1, String arg2, String arg3)
- Overrides:
postin classit.geosolutions.geonetwork.util.HTTPUtils
-
post
public String post(String url, File file, String contentType)
- Overrides:
postin classit.geosolutions.geonetwork.util.HTTPUtils
-
post
public String post(String url, InputStream content, String contentType)
- Overrides:
postin classit.geosolutions.geonetwork.util.HTTPUtils
-
post
public String post(String url, org.apache.commons.httpclient.methods.RequestEntity requestEntity)
- Overrides:
postin classit.geosolutions.geonetwork.util.HTTPUtils
-
post
public String post(String url, String content, String contentType)
- Overrides:
postin classit.geosolutions.geonetwork.util.HTTPUtils
-
postXml
public String postXml(String url, InputStream content)
- Overrides:
postXmlin classit.geosolutions.geonetwork.util.HTTPUtils
-
postXml
public String postXml(String url, String content)
- Overrides:
postXmlin classit.geosolutions.geonetwork.util.HTTPUtils
-
postXml
public String postXml(String url, String content, String encoding)
- Overrides:
postXmlin classit.geosolutions.geonetwork.util.HTTPUtils
-
put
public String put(String arg0, String arg1, String arg2)
- Overrides:
putin classit.geosolutions.geonetwork.util.HTTPUtils
-
put
public String put(String url, File file, String contentType)
- Overrides:
putin classit.geosolutions.geonetwork.util.HTTPUtils
-
put
public String put(String url, org.apache.commons.httpclient.methods.RequestEntity requestEntity)
- Overrides:
putin classit.geosolutions.geonetwork.util.HTTPUtils
-
-