NetworkCallRecord Class
- java.
lang. Object - com.
azure. core. test. models. NetworkCallRecord
- com.
public class NetworkCallRecord
Keeps track of network call records from each unit test session.
Constructor Summary
Constructor | Description | |
---|---|---|
NetworkCallRecord() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Network |
getException()
Gets the throwable thrown during evaluation of the network call. |
Map<String,String> |
getHeaders()
Gets the HTTP headers for the network call. |
String |
getMethod()
Gets the HTTP method for with this network call |
Map<String,String> |
getResponse()
Gets the contents of the HTTP response as a map of its HTTP headers and response body. |
String |
getUri()
Gets the URL for this network call. |
void |
setException(NetworkCallError exception)
Sets the throwable thrown during evaluation of the network call. |
void |
setHeaders(Map<String,String> headers)
Sets the HTTP headers for the network call. |
void |
setMethod(String method)
Sets the HTTP method for with this network call |
void |
setResponse(Map<String,String> response)
Sets the contents of the HTTP response as a map of its HTTP headers and response body. |
void |
setUri(String uri)
Sets the URL for this network call. |
Methods inherited from java.lang.Object
Constructor Details
NetworkCallRecord
public NetworkCallRecord()
Method Details
getException
public NetworkCallError getException()
Gets the throwable thrown during evaluation of the network call.
Returns:
getHeaders
public Map
Gets the HTTP headers for the network call.
Returns:
getMethod
public String getMethod()
Gets the HTTP method for with this network call
Returns:
getResponse
public Map
Gets the contents of the HTTP response as a map of its HTTP headers and response body. The HTTP response body is mapped under key "Body".
Returns:
getUri
public String getUri()
Gets the URL for this network call.
Returns:
setException
public void setException(NetworkCallError exception)
Sets the throwable thrown during evaluation of the network call.
Parameters:
setHeaders
public void setHeaders(Map
Sets the HTTP headers for the network call.
Parameters:
setMethod
public void setMethod(String method)
Sets the HTTP method for with this network call
Parameters:
setResponse
public void setResponse(Map
Sets the contents of the HTTP response as a map of its HTTP headers and response body. The HTTP response body is mapped under key "body".
Parameters:
setUri
public void setUri(String uri)
Sets the URL for this network call.
Parameters:
Applies to
Azure SDK for Java