HttpSvc.I Interface
- public static interface HttpSvc.I
-
All Known Subinterfaces
-
HttpSvc.IRuntime
-
Enclosing class
-
HttpSvc
public HttpSvc.IQueryResponse |
-
queryURL (URL url, int requestMethod, Reader requestBody, boolean allowAuthDialog)
- Connects to the URL, sends the requestBody and then returns the response
from the server.
|
public HttpSvc.IQueryResponse |
-
queryURL (URL url, int requestMethod, String requestBody, boolean allowAuthDialog)
- Same as the other queryURL, except the requestBody is a String.
|
public HttpSvc.IQueryResponse |
-
queryURLConnection (HttpURLConnection conn, int requestMethod, Reader requestBody)
- Handles the response from a HttpURLConnection.
|
public HttpSvc.IQueryResponse |
-
queryURLConnection (HttpURLConnection conn, int requestMethod, String requestBody)
- Same as queryURLConnection, except the requestBody is a String.
|
queryURL(URL, int, Reader, boolean) Method
public HttpSvc.IQueryResponse
queryURL(URL
url,
int requestMethod,
Reader
requestBody,
boolean allowAuthDialog)
throws IOException
Connects to the URL, sends the requestBody and then returns the response
from the server. All the encoding is handled by the service. The request
is POSTed to the URL. If one wants to use GET, then see the method
getURLConnection.
Parameters
-
url
- The URL to connect to.
-
requestMethod
- Must be one of GET or POST
-
requestBody
- What to send the server (ignored if method is GET).
-
allowAuthDialog
- true means display an authentication dialog to the user if challenged.
Returns
- IQueryResponse wraps the returned Reader/InputStream
Exceptions
-
IOException
queryURL(URL, int, String, boolean) Method
public HttpSvc.IQueryResponse
queryURL(URL
url,
int requestMethod,
String
requestBody,
boolean allowAuthDialog)
throws IOException
Same as the other queryURL, except the requestBody is a String.
Exceptions
-
IOException
queryURLConnection(HttpURLConnection, int, Reader) Method
public HttpSvc.IQueryResponse
queryURLConnection(HttpURLConnection
conn,
int requestMethod,
Reader
requestBody)
throws IOException
Handles the response from a HttpURLConnection. This method is useful if one
wants to set additional parameters on the connection before performing the query.
Parameters
-
conn
- the connection to communicate with.
-
requestMethod
- What to send the connection.
Returns
- IQueryResponse wraps the returned Reader/InputStream
Exceptions
-
IOException
queryURLConnection(HttpURLConnection, int, String) Method
public HttpSvc.IQueryResponse
queryURLConnection(HttpURLConnection
conn,
int requestMethod,
String
requestBody)
throws IOException
Same as queryURLConnection, except the requestBody is a String.
Exceptions
-
IOException