public interface

INet

com.pnfsoftware.jeb.util.net.INet
Known Indirect Subclasses

Class Overview

Convenience network utility interface to issue common GET/POST (http or https) queries that return textual contents.

Summary

Public Methods
abstract String post(String url, Map<String, String> urlParams, Map<String, String> bodyParams)
@return
abstract String post(String url, Map<String, String> urlParams, Map<String, String> bodyParams, Map<String, String> serverHeaders)
Perform an http POST request to send a simple form.
abstract String postMultipart(String url, Map<String, String> formParams, Map<String, FormFileEntry> formFiles, Map<String, String> serverHeaders)
Perform an http POST request to send a form using the multipart/form-data encoding.
abstract String postMultipart(String url, Map<String, String> formParams, Map<String, FormFileEntry> formFiles)
@return
abstract String query(String url, Map<String, String> parameters)
@return
abstract String query(String url, Map<String, String> parameters, Map<String, String> serverHeaders)
Perform an http GET request.
abstract String query(String url)
Perform an http GET request.
abstract byte[] queryBinary(String url, Map<String, String> parameters, Map<String, String> serverHeaders)
Perform an http GET request.
abstract byte[] queryBinary(String url, Map<String, String> parameters)
@return
abstract byte[] queryBinary(String url)
Perform an http GET request.

Public Methods

public abstract String post (String url, Map<String, String> urlParams, Map<String, String> bodyParams)

@return

Throws
IOException

public abstract String post (String url, Map<String, String> urlParams, Map<String, String> bodyParams, Map<String, String> serverHeaders)

Perform an http POST request to send a simple form.

Parameters
url url with optional parameters
urlParams optional additional url parameters
bodyParams request content parameters
Returns
  • the server response
Throws
IOException on error

public abstract String postMultipart (String url, Map<String, String> formParams, Map<String, FormFileEntry> formFiles, Map<String, String> serverHeaders)

Perform an http POST request to send a form using the multipart/form-data encoding.

Parameters
url url with optional parameters
formParams optional request content parameters
formFiles optional request content files
Returns
  • the server response
Throws
IOException on error

public abstract String postMultipart (String url, Map<String, String> formParams, Map<String, FormFileEntry> formFiles)

@return

Throws
IOException

public abstract String query (String url, Map<String, String> parameters)

@return

Throws
IOException

public abstract String query (String url, Map<String, String> parameters, Map<String, String> serverHeaders)

Perform an http GET request.

Parameters
url url with optional parameters
parameters optional additional url parameters
Returns
  • the server response
Throws
IOException on error

public abstract String query (String url)

Perform an http GET request.

Parameters
url url with optional parameters
Returns
  • the server response
Throws
IOException on error

public abstract byte[] queryBinary (String url, Map<String, String> parameters, Map<String, String> serverHeaders)

Perform an http GET request.

Parameters
url url with optional parameters
parameters optional additional url parameters
Returns
  • the server response
Throws
IOException on error

public abstract byte[] queryBinary (String url, Map<String, String> parameters)

@return

Throws
IOException

public abstract byte[] queryBinary (String url)

Perform an http GET request.

Parameters
url url with optional parameters
Returns
  • the server response
Throws
IOException on error