Table of Contents

Class Response

Namespace
Cloudflare.NET.Security.Rulesets.Models
Assembly
Cloudflare.NET.dll

Defines a custom HTTP response for a rule action.

public record Response : IEquatable<Response>
Inheritance
Response
Implements
Inherited Members

Constructors

Response(int, string?, string?)

Defines a custom HTTP response for a rule action.

public Response(int StatusCode, string? Content = null, string? ContentType = null)

Parameters

StatusCode int

The HTTP status code.

Content string

The body of the response.

ContentType string

The content type of the response.

Properties

Content

The body of the response.

[JsonPropertyName("content")]
public string? Content { get; init; }

Property Value

string

ContentType

The content type of the response.

[JsonPropertyName("content_type")]
public string? ContentType { get; init; }

Property Value

string

StatusCode

The HTTP status code.

[JsonPropertyName("status_code")]
public int StatusCode { get; init; }

Property Value

int