public void AddField <T>(string name, T value, MimeType mediaType) { name.AssertNotNull(nameof(name)); mediaType.AssertNotNull(nameof(mediaType)); _fields.Insert(0, new RequestFormField(name, RestValue.Create(value), mediaType)); }
public RestClientBuilder WithDefaultRequestSegment <T>(string name, T value) { name.AssertNotNullOrEmpty(nameof(name)); var segment = new RequestRouteSegment(name, RestValue.Create(value)); _container.Register(new RequestEnricher(x => x.AddRouteSegment(segment))); return(this); }
public RestClientBuilder WithDefaultRequestQuery <T>(string name, T value) { name.AssertNotNullOrEmpty(nameof(name)); var query = new RequestQuery(name, RestValue.Create(value)); _container.Register(new RequestEnricher(x => x.AddQuery(query))); return(this); }
public void AddQuery <T>(string name, T value) { name.AssertNotNullOrEmpty(nameof(name)); AddQuery(new RequestQuery(name, RestValue.Create(value))); }
public void AddRouteSegment <T>(string name, T value) { name.AssertNotNullOrEmpty(nameof(name)); AddRouteSegment(new RequestRouteSegment(name, RestValue.Create(value))); }