RestSharp by John Sheehan, Andrew Young, Alexey Zimarev and RestSharp community

<PackageReference Include="RestSharp" Version="107.2.2-alpha.0.1" />

 RestRequest

public class RestRequest
Container for data used to make requests

Set this to handle the response stream yourself, based on the response details

public bool AlwaysMultipartFormData { get; set; }

Always send a multipart/form-data request - even when no Files are present.

public int Attempts { get; }

How many attempts were made to send this Request

Completion option for HttpClient

Container of all the files to be uploaded with the request.

public string FormBoundary { get; set; }

public Method Method { get; set; }

Determines what HTTP method to use for this request. Supported methods: GET, POST, PUT, DELETE, HEAD, OPTIONS Default is GET

When supplied, the function will be called after the request is complete

When supplied, the function will be called before calling the deserializer

When supplied, the function will be called before making a request

Container of all HTTP parameters to be passed with the request. See AddParameter() for explanation of the types of parameters that can be passed

public DataFormat RequestFormat { get; set; }

Serializer to use when writing request bodies.

public string Resource { get; set; }

The Resource URL to make the request against. Tokens are substituted with UrlSegment parameters and match by name. Should not include the scheme or domain. Do not include leading slash. Combined with RestClient.BaseUrl to assemble final URL: {BaseUrl}/{Resource} (BaseUrl is scheme + domain, e.g. http://example.com)

public Func<Stream, Stream> ResponseWriter { get; set; }

Set this to write response to Stream rather than reading into memory.

public string RootElement { get; set; }

Used by the default deserializers to determine where to start deserializing from. Can be used to skip container or root elements that do not have corresponding deserialzation targets.

public int Timeout { get; set; }

Custom request timeout

public RestRequest()

Default constructor

public RestRequest(string resource, Method method = 0)

public RestRequest(Uri resource, Method method = 0)

Adds a parameter object to the request parameters

public void RemoveParameter(Parameter parameter)

Removes a parameter object from the request parameters