Show / Hide Table of Contents

Class Http

An Http action that can be included on a ReceivedMessage or SendingMessage. Sends a HTTP request when the action button is tapped.

Inheritance
object
Action
Http
Implements
IAction
Inherited Members
Action.Label
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ntfy.Actions
Assembly: ntfy.dll
Syntax
public class Http : Action, IAction

Constructors

| Improve this Doc View Source

Http(string, Uri)

Constructor for an Http action.

Declaration
public Http(string label, Uri url)
Parameters
Type Name Description
string label

The label for the action.

Uri url

The URL to which the HTTP request will be sent.

Properties

| Improve this Doc View Source

Body

Optional body to include in the Http request.

Declaration
[JsonProperty("body", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public string? Body { get; set; }
Property Value
Type Description
string
| Improve this Doc View Source

Clear

Whether to clear the associated notification after the HTTP request succeeds. If the request fails, the notification is not cleared. Defaults to false.

Declaration
[JsonProperty("clear", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public bool? Clear { get; set; }
Property Value
Type Description
bool?
| Improve this Doc View Source

Headers

Optional headers to include in the Http request.

Declaration
[JsonProperty("headers", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public Dictionary<string, string>? Headers { get; set; }
Property Value
Type Description
Dictionary<string, string>
| Improve this Doc View Source

Method

The HTTP method to use when sending the request. Defaults to HttpMethod.Post

Declaration
[JsonIgnore]
public HttpMethod? Method { get; set; }
Property Value
Type Description
HttpMethod
| Improve this Doc View Source

MethodString

The HTTP method to use when sending the request, as a string. Defaults to "POST" This representation is used by API calls, and is hidden from end users.

Declaration
[JsonProperty("method", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public string? MethodString { get; set; }
Property Value
Type Description
string
| Improve this Doc View Source

Type

The type of this action, as an ActionType enum.

Declaration
[JsonIgnore]
public override ActionType Type { get; }
Property Value
Type Description
ActionType
Overrides
Action.Type
| Improve this Doc View Source

Url

The URL to which the HTTP request will be sent.

Declaration
[JsonProperty("url", Required = Required.AllowNull, NullValueHandling = NullValueHandling.Ignore)]
public Uri Url { get; set; }
Property Value
Type Description
Uri

Implements

IAction
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX