Skip to main content

Class PutReturningRequest<TOut>

Namespace: Consul
Assembly: Consul.dll

Performs a PUT to API endpoints in Consul, returning a generic type

public class PutReturningRequest<TOut> : ConsulRequest

Type Parameters

TOut

A generic type to be deserialised and returned

Inheritance

objectConsulRequestPutReturningRequest<TOut>

Inherited Members

ConsulRequest.ApplyOptions(ConsulClientConfiguration) , ConsulRequest.ApplyHeaders(HttpRequestMessage, ConsulClientConfiguration) , ConsulRequest.BuildConsulUri(string, Dictionary<string, string>) , ConsulRequest.Deserialize<TOut>(Stream) , ConsulRequest.Serialize(object) , object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()

Constructors

PutReturningRequest(ConsulClient, string, WriteOptions)

public PutReturningRequest(ConsulClient client, string url, WriteOptions options = null)

Parameters

client ConsulClient

url string

options WriteOptions

Properties

Options

public WriteOptions Options { get; set; }

Property Value

WriteOptions

Methods

ApplyHeaders(HttpRequestMessage, ConsulClientConfiguration)

protected override void ApplyHeaders(HttpRequestMessage message, ConsulClientConfiguration clientConfig)

Parameters

message HttpRequestMessage

clientConfig ConsulClientConfiguration

ApplyOptions(ConsulClientConfiguration)

protected override void ApplyOptions(ConsulClientConfiguration clientConfig)

Parameters

clientConfig ConsulClientConfiguration

Execute(CancellationToken)

Execute the PUT request to the API

public Task<WriteResult<TOut>> Execute(CancellationToken ct)

Parameters

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <TOut>>

The result of the PUT, including a deserialised generic type object

  • Constructors
    • PutReturningRequest(ConsulClient, string, WriteOptions)
  • Properties
    • Options
  • Methods
    • ApplyHeaders(HttpRequestMessage, ConsulClientConfiguration)
    • ApplyOptions(ConsulClientConfiguration)
    • Execute(CancellationToken)