Class ResponseAttributesHelper
java.lang.Object
com.mulesoft.connectors.a2a.internal.client.helper.ResponseAttributesHelper
Utility class for creating ResponseAttributes objects from HTTP responses.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResponseAttributescreateFromHttpResponse(org.mule.runtime.http.api.domain.message.response.HttpResponse response) Creates ResponseAttributes from an HTTP response.static StreamingResponseAttributescreateStreamingFromResponseAttributes(ResponseAttributes originalAttributes, Boolean finalEventFound) Creates StreamingResponseAttributes from existing ResponseAttributes with final event information.
-
Method Details
-
createFromHttpResponse
public static ResponseAttributes createFromHttpResponse(org.mule.runtime.http.api.domain.message.response.HttpResponse response) Creates ResponseAttributes from an HTTP response.- Parameters:
response- the HTTP response- Returns:
- ResponseAttributes object with status code, headers, and reason phrase
-
createStreamingFromResponseAttributes
public static StreamingResponseAttributes createStreamingFromResponseAttributes(ResponseAttributes originalAttributes, Boolean finalEventFound) Creates StreamingResponseAttributes from existing ResponseAttributes with final event information.- Parameters:
originalAttributes- the original response attributesfinalEventFound- whether a final event was found during the SSE session- Returns:
- StreamingResponseAttributes object with enhanced streaming information
-