public class EepPost extends EepGet
EepGet.AUTH_MODE, EepGet.AuthState, EepGet.CLIStatusListener, EepGet.Gunzipper, EepGet.StatusListener_aborted, _acceptRanges, _actualURL, _alreadyTransferred, _authState, _bytesRemaining, _bytesTransferred, _cacheControl, _contentEncoding, _contentLanguage, _contentType, _context, _cookie, _csp, _currentAttempt, _decompressException, _encodingChunked, _etag, _etagOrig, _expiryDate, _extraHeaders, _fetchHeaderTimeout, _fetchInactivityTimeout, _fetchTotalTimeout, _isGzippedResponse, _keepFetching, _lastModified, _lastModifiedOrig, _listeners, _log, _notModified, _numRetries, _out, _outputFile, _outputStream, _proxy, _proxyHost, _proxyIn, _proxyOut, _proxyPort, _redirectLocation, _redirects, _referrerPolicy, _responseCode, _responseText, _server, _shouldProxy, _shouldWriteErrorToOutput, _status, _transferEncoding, _transferFailed, _url, _vary, _xContentTypeOptions, _xframeOptions, _xPoweredBy, _xssProtection, CONNECT_TIMEOUT, INACTIVITY_TIMEOUT, MAX_COMPLETE_FAILS, USER_AGENT| Constructor and Description |
|---|
EepPost(I2PAppContext ctx,
String proxyHost,
int proxyPort,
int numRetries,
String outputFile,
String url) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
fetch()
Blocking fetch, returning true if the URL was retrieved, false if all retries failed.
|
boolean |
fetch(long fetchHeaderTimeout)
Blocking fetch, timing out individual attempts if the HTTP response headers
don't come back in the time given.
|
boolean |
fetch(long fetchHeaderTimeout,
long totalTimeout,
long inactivityTimeout)
Blocking fetch.
|
static void |
main(String[] args)
EepPost [-p 127.0.0.1:4444] [-n #retries] url
|
boolean |
post(Map<String,Object> fields,
long headerTimeout,
long totalTimeout,
long inactivityTimeout)
Submit an HTTP POST to the given URL (using the proxy if specified), uploading the given fields.
|
boolean |
post(String contentType,
byte[] data,
long headerTimeout,
long totalTimeout,
long inactivityTimeout)
In-memory, not for large POSTs
|
boolean |
post(String contentType,
File data,
long headerTimeout,
long totalTimeout,
long inactivityTimeout)
For large POSTs
|
boolean |
post(String contentType,
String data,
long headerTimeout,
long totalTimeout,
long inactivityTimeout)
In-memory, not for large POSTs
|
addAuthorization, addHeader, addStatusListener, doFetch, getAcceptRanges, getCacheControl, getContentEncoding, getContentLanguage, getContentType, getCookie, getCSP, getEtag, getExpiryDate, getLastModified, getNotModified, getReferrerPolicy, getRequest, getServer, getStatus, getStatusCode, getStatusText, getTransferEncoding, getVary, getXContentTypeOptions, getXframeOptions, getXPoweredBy, getXSSProtection, parseAuthArgs, readChunkLength, readHeaders, sendRequest, setPostData, setPostData, setPostData, setWriteErrorToOutput, shouldReadBody, stopFetching, suggestNamepublic EepPost(I2PAppContext ctx, String proxyHost, int proxyPort, int numRetries, String outputFile, String url)
public boolean fetch()
EepGetfetch in class EepGetUnsupportedOperationException - alwayspublic boolean fetch(long fetchHeaderTimeout)
EepGetfetch in class EepGetUnsupportedOperationException - alwayspublic boolean fetch(long fetchHeaderTimeout,
long totalTimeout,
long inactivityTimeout)
EepGetfetch in class EepGetfetchHeaderTimeout - <= 0 for none (proxy will timeout if none, none isn't recommended if no proxy)totalTimeout - <= 0 for default noneinactivityTimeout - <= 0 for default 60 secUnsupportedOperationException - alwayspublic static void main(String[] args)
public boolean post(Map<String,Object> fields, long headerTimeout, long totalTimeout, long inactivityTimeout)
public boolean post(String contentType, byte[] data, long headerTimeout, long totalTimeout, long inactivityTimeout)
public boolean post(String contentType, File data, long headerTimeout, long totalTimeout, long inactivityTimeout)