# Interface: com.pnfsoftware.jeb.util.net.INet

Convenience network utility interface to issue common GET/POST \(http or https\) queries that return text contents. The primary network utility class in this package implements this interface.

## Method: downloadBinary
- parameter: `dstfile`, type: `java.io.File`
- parameter: `url`, type: `java.lang.String`
- parameter: `urlParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `serverHeaders`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `progressCallback`, type: `com.pnfsoftware.jeb.util.base.IProgressCallback`
- return type: `long`

Description: Download a binary and dump it to disk. Similar to [#queryBinary(String, Map, Map, IProgressCallback)](#queryBinary(String, Map, Map, IProgressCallback)), but the downloaded data is not stored and returned, therefore making this method more suitable to download Large files.
parameter: dstfile: 
parameter: url: 
parameter: urlParams: 
parameter: serverHeaders: 
parameter: progressCallback: optional listener
return: the server response
throws: 

## Method: duplicate
- return type: `com.pnfsoftware.jeb.util.net.INet`

Description: Duplicate this object to perform safe parameter update.
return: a new net object with the same properties as this object \(timeouts, user\-agent, etc.\)

## Method: getConnectTimeout
- return type: `int`

Description: 
return: timeout in milliseconds

## Method: getReadTimeout
- return type: `int`

Description: 
return: timeout in milliseconds

## Method: getSecureSocketInfo
- return type: `com.pnfsoftware.jeb.util.net.SecureSocketInfo`

Description: 
return: 

## Method: getUserAgent
- return type: `java.lang.String`

Description: 
return: the user\-agent

## Method: getWriteTimeout
- return type: `int`

Description: 
return: timeout in milliseconds

## Method: post
- parameter: `url`, type: `java.lang.String`
- parameter: `urlParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `bodyParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `serverHeaders`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `java.lang.String`

Description: Perform an http POST request to send a simple form.
parameter: url: url with optional parameters
parameter: urlParams: optional additional url parameters
parameter: bodyParams: request content parameters
parameter: serverHeaders: 
return: the server response
throws: on error

## Method: post
- parameter: `url`, type: `java.lang.String`
- parameter: `urlParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `bodyParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `java.lang.String`

Description: 
parameter: url: 
parameter: urlParams: 
parameter: bodyParams: 
return: 
throws: 

## Method: postMultipart
- parameter: `url`, type: `java.lang.String`
- parameter: `formParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `formFiles`, type: `java.util.Map<java.lang.String,com.pnfsoftware.jeb.util.net.FormFileEntry>`
- parameter: `serverHeaders`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `java.lang.String`

Description: Perform an http POST request to send a form using the `multipart/form-data` encoding.
parameter: url: url with optional parameters
parameter: formParams: optional request content parameters
parameter: formFiles: optional request content files
parameter: serverHeaders: 
return: the server response
throws: on error

## Method: postMultipart
- parameter: `url`, type: `java.lang.String`
- parameter: `formParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `formFiles`, type: `java.util.Map<java.lang.String,com.pnfsoftware.jeb.util.net.FormFileEntry>`
- return type: `java.lang.String`

Description: 
parameter: url: 
parameter: formParams: 
parameter: formFiles: 
return: 
throws: 

## Method: query
- parameter: `url`, type: `java.lang.String`
- parameter: `parameters`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `serverHeaders`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `java.lang.String`

Description: Perform an http GET request.
parameter: url: url with optional parameters
parameter: parameters: optional additional url parameters
parameter: serverHeaders: 
return: the server response
throws: on error

## Method: query
- parameter: `url`, type: `java.lang.String`
- parameter: `parameters`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `java.lang.String`

Description: 
parameter: url: 
parameter: parameters: 
return: 
throws: 

## Method: query
- parameter: `url`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Perform an http GET request.
parameter: url: url with optional parameters
return: the server response
throws: on error

## Method: queryBinary
- parameter: `url`, type: `java.lang.String`
- parameter: `urlParams`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `serverHeaders`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `progressCallback`, type: `com.pnfsoftware.jeb.util.base.IProgressCallback`
- return type: `byte[]`

Description: Perform an http GET request.
parameter: url: 
parameter: urlParams: 
parameter: serverHeaders: 
parameter: progressCallback: optional listener
return: the server response
throws: 

## Method: queryBinary
- parameter: `url`, type: `java.lang.String`
- parameter: `parameters`, type: `java.util.Map<java.lang.String,java.lang.String>`
- parameter: `serverHeaders`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `byte[]`

Description: Perform an http GET request.
parameter: url: url with optional parameters
parameter: parameters: optional additional url parameters
parameter: serverHeaders: 
return: the server response
throws: on error

## Method: queryBinary
- parameter: `url`, type: `java.lang.String`
- parameter: `parameters`, type: `java.util.Map<java.lang.String,java.lang.String>`
- return type: `byte[]`

Description: 
parameter: url: 
parameter: parameters: 
return: 
throws: 

## Method: queryBinary
- parameter: `url`, type: `java.lang.String`
- return type: `byte[]`

Description: Perform an http GET request.
parameter: url: url with optional parameters
return: the server response
throws: on error

## Method: setConnectTimeout
- parameter: `timeout`, type: `int`

Description: 
parameter: timeout: in milliseconds

## Method: setReadTimeout
- parameter: `timeout`, type: `int`

Description: 
parameter: timeout: timeout in milliseconds

## Method: setSecureSocketInfo
- parameter: `info`, type: `com.pnfsoftware.jeb.util.net.SecureSocketInfo`

Description: 
parameter: info: 

## Method: setUserAgent
- parameter: `userAgent`, type: `java.lang.String`

Description: 
parameter: userAgent: a user\-agent

## Method: setWriteTimeout
- parameter: `timeout`, type: `int`

Description: 
parameter: timeout: timeout in milliseconds

