Scoop API

scoop:scoop.http.client:0.1.0

HttpSseException

class HttpSseException

source · line 111
public
public class HttpSseException public constructor(
    /**
     * The SSE setup or replay failure category.
     */
    public val reason: HttpSseFailureReason,
    /**
         * The URL involved.
         */
    public val url: Url,
    /**
         * The response head when one was received.
         */
    public val head: HttpResponseHead? = None
) : Exception(
    Some(
        when (reason) {
            case UnexpectedStatus -> "SSE requires status 200 or 204"
            case UnsupportedContentType -> "SSE requires text/event-stream"
            case BodyNotReplayable -> "SSE reconnect requires a replayable request body"
        }
    )
)

An SSE setup or reconnection failure with the URL and response head when available.