|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.microsoft.aad.adal.WebRequestHandler
public class WebRequestHandler
It uses one time async task. WebRequest are wrapped here to prevent multiple reuses for same tasks. Each request returns a handler for cancel action. Call this from UI thread to correctly create async task and execute.
| Field Summary | |
|---|---|
static String |
HEADER_ACCEPT
Header for accept. |
static String |
HEADER_ACCEPT_JSON
Header for json type. |
| Constructor Summary | |
|---|---|
WebRequestHandler()
Creates http request. |
|
| Method Summary | |
|---|---|
HttpWebResponse |
sendGet(URL url,
HashMap<String,String> headers)
|
HttpWebResponse |
sendPost(URL url,
HashMap<String,String> headers,
byte[] content,
String contentType)
|
void |
setRequestCorrelationId(UUID requestCorrelationId)
Sets correlationId. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String HEADER_ACCEPT
public static final String HEADER_ACCEPT_JSON
| Constructor Detail |
|---|
public WebRequestHandler()
| Method Detail |
|---|
public HttpWebResponse sendGet(URL url,
HashMap<String,String> headers)
sendGet in interface IWebRequestHandler
public HttpWebResponse sendPost(URL url,
HashMap<String,String> headers,
byte[] content,
String contentType)
sendPost in interface IWebRequestHandlerpublic void setRequestCorrelationId(UUID requestCorrelationId)
setRequestCorrelationId in interface IWebRequestHandlerrequestCorrelationId - UUID
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||