PushDeliveryResult Class
What a push delivery request earns: the status code the transport answers with, and - only beside a 400 - the error body the transmitter reads (RFC 8935 Sections 2.2, 2.3). The shape is transport-neutral on purpose: any host adapter renders it, none decides it.
public sealed record PushDeliveryResult : System.IEquatable<Abblix.SecurityEvents.Delivery.PushDeliveryResult>Inheritance System.Object → PushDeliveryResult
Implements System.IEquatable<PushDeliveryResult>
Constructors
PushDeliveryResult(HttpStatusCode, DeliveryError) Constructor
What a push delivery request earns: the status code the transport answers with, and - only beside a 400 - the error body the transmitter reads (RFC 8935 Sections 2.2, 2.3). The shape is transport-neutral on purpose: any host adapter renders it, none decides it.
public PushDeliveryResult(System.Net.HttpStatusCode StatusCode, Abblix.SecurityEvents.Delivery.DeliveryError? Error);Parameters
StatusCode System.Net.HttpStatusCode
The HTTP status the response carries.
Error DeliveryError
The error body of a failure response; null on acceptance, whose response body is empty (RFC 8935 Section 2.2).
Fields
PushDeliveryResult.ErrorLanguage Field
The language of the error descriptions this package writes, for the header RFC 8935 Section 2.3 requires beside them: "The response MUST include a 'Content-Language' header field whose value indicates the language of the error descriptions included in the response body."
public const string ErrorLanguage = "en";Field Value
Remarks
Stated here rather than in each host adapter, because the language is a property of the descriptions and those are written here. A deployment translating them replaces the value where it replaces the text, and the two cannot then part.
Properties
PushDeliveryResult.Accepted Property
The one success: "202 Accepted" with an empty body (RFC 8935 Section 2.2). A single shared instance, because acceptance carries no request-specific state.
public static Abblix.SecurityEvents.Delivery.PushDeliveryResult Accepted { get; }Property Value
PushDeliveryResult.Error Property
The error body of a failure response; null on acceptance, whose response body is empty (RFC 8935 Section 2.2).
public Abblix.SecurityEvents.Delivery.DeliveryError? Error { get; init; }Property Value
PushDeliveryResult.StatusCode Property
The HTTP status the response carries.
public System.Net.HttpStatusCode StatusCode { get; init; }Property Value
Methods
PushDeliveryResult.BadRequest(DeliveryError) Method
A rejection: "400 Bad Request" carrying the error the transmitter acts on (RFC 8935 Section 2.3).
public static Abblix.SecurityEvents.Delivery.PushDeliveryResult BadRequest(Abblix.SecurityEvents.Delivery.DeliveryError error);Parameters
error DeliveryError
What was wrong with the SET, in registry vocabulary.