public class MockHttp
extends Object
implements com.liferay.portal.kernel.util.Http
com.liferay.portal.kernel.util.Http.Auth, com.liferay.portal.kernel.util.Http.Body, com.liferay.portal.kernel.util.Http.CookieSpec, com.liferay.portal.kernel.util.Http.FilePart, com.liferay.portal.kernel.util.Http.InputStreamPart, com.liferay.portal.kernel.util.Http.Method, com.liferay.portal.kernel.util.Http.Options, com.liferay.portal.kernel.util.Http.Response| Constructor and Description |
|---|
MockHttp(Map<String,com.liferay.petra.function.UnsafeSupplier<String,Exception>> unsafeSuppliers) |
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.Cookie[] |
getCookies() |
boolean |
hasProxyConfig() |
boolean |
isNonProxyHost(String host) |
boolean |
isProxyHost(String host) |
byte[] |
URLtoByteArray(com.liferay.portal.kernel.util.Http.Options options) |
byte[] |
URLtoByteArray(String location) |
byte[] |
URLtoByteArray(String location,
boolean post) |
InputStream |
URLtoInputStream(com.liferay.portal.kernel.util.Http.Options options) |
InputStream |
URLtoInputStream(String location) |
InputStream |
URLtoInputStream(String location,
boolean post) |
String |
URLtoString(com.liferay.portal.kernel.util.Http.Options options) |
String |
URLtoString(String location) |
String |
URLtoString(String location,
boolean post) |
String |
URLtoString(URL url) |
public MockHttp(Map<String,com.liferay.petra.function.UnsafeSupplier<String,Exception>> unsafeSuppliers)
public javax.servlet.http.Cookie[] getCookies()
getCookies in interface com.liferay.portal.kernel.util.Httppublic boolean hasProxyConfig()
hasProxyConfig in interface com.liferay.portal.kernel.util.Httppublic boolean isNonProxyHost(String host)
isNonProxyHost in interface com.liferay.portal.kernel.util.Httppublic boolean isProxyHost(String host)
isProxyHost in interface com.liferay.portal.kernel.util.Httppublic byte[] URLtoByteArray(com.liferay.portal.kernel.util.Http.Options options)
throws IOException
URLtoByteArray in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic byte[] URLtoByteArray(String location)
throws IOException
URLtoByteArray in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic byte[] URLtoByteArray(String location,
boolean post)
throws IOException
URLtoByteArray in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic InputStream URLtoInputStream(com.liferay.portal.kernel.util.Http.Options options)
throws IOException
URLtoInputStream in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic InputStream URLtoInputStream(String location)
throws IOException
URLtoInputStream in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic InputStream URLtoInputStream(String location,
boolean post)
throws IOException
URLtoInputStream in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic String URLtoString(com.liferay.portal.kernel.util.Http.Options options)
throws IOException
URLtoString in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic String URLtoString(String location)
throws IOException
URLtoString in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic String URLtoString(String location,
boolean post)
throws IOException
URLtoString in interface com.liferay.portal.kernel.util.HttpIOExceptionpublic String URLtoString(URL url)
throws IOException
URLtoString in interface com.liferay.portal.kernel.util.HttpIOException