Package com.azure.core.http
Class HttpPipelineCallContext
- java.lang.Object
-
- com.azure.core.http.HttpPipelineCallContext
-
public final class HttpPipelineCallContext extends Object
Represents the information used to make a single HTTP request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Object>getData(String key)Gets a value with the given key stored in the context.HttpRequestgetHttpRequest()Gets the HTTP request.voidsetData(String key, Object value)Stores a key-value data in the context.HttpPipelineCallContextsetHttpRequest(HttpRequest request)Sets the HTTP request object in the context.
-
-
-
Method Detail
-
setData
public void setData(String key, Object value)
Stores a key-value data in the context.- Parameters:
key- The key to add.value- The value to associate with that key.
-
getData
public Optional<Object> getData(String key)
Gets a value with the given key stored in the context.- Parameters:
key- The key to find in the context.- Returns:
- The value associated with the key.
-
getHttpRequest
public HttpRequest getHttpRequest()
Gets the HTTP request.- Returns:
- The HTTP request.
-
setHttpRequest
public HttpPipelineCallContext setHttpRequest(HttpRequest request)
Sets the HTTP request object in the context.- Parameters:
request- The HTTP request.- Returns:
- The updated HttpPipelineCallContext object.
-
-