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.Http
public boolean hasProxyConfig()
hasProxyConfig
in interface com.liferay.portal.kernel.util.Http
public boolean isNonProxyHost(String host)
isNonProxyHost
in interface com.liferay.portal.kernel.util.Http
public boolean isProxyHost(String host)
isProxyHost
in interface com.liferay.portal.kernel.util.Http
public byte[] URLtoByteArray(com.liferay.portal.kernel.util.Http.Options options) throws IOException
URLtoByteArray
in interface com.liferay.portal.kernel.util.Http
IOException
public byte[] URLtoByteArray(String location) throws IOException
URLtoByteArray
in interface com.liferay.portal.kernel.util.Http
IOException
public byte[] URLtoByteArray(String location, boolean post) throws IOException
URLtoByteArray
in interface com.liferay.portal.kernel.util.Http
IOException
public InputStream URLtoInputStream(com.liferay.portal.kernel.util.Http.Options options) throws IOException
URLtoInputStream
in interface com.liferay.portal.kernel.util.Http
IOException
public InputStream URLtoInputStream(String location) throws IOException
URLtoInputStream
in interface com.liferay.portal.kernel.util.Http
IOException
public InputStream URLtoInputStream(String location, boolean post) throws IOException
URLtoInputStream
in interface com.liferay.portal.kernel.util.Http
IOException
public String URLtoString(com.liferay.portal.kernel.util.Http.Options options) throws IOException
URLtoString
in interface com.liferay.portal.kernel.util.Http
IOException
public String URLtoString(String location) throws IOException
URLtoString
in interface com.liferay.portal.kernel.util.Http
IOException
public String URLtoString(String location, boolean post) throws IOException
URLtoString
in interface com.liferay.portal.kernel.util.Http
IOException
public String URLtoString(URL url) throws IOException
URLtoString
in interface com.liferay.portal.kernel.util.Http
IOException