csharp-functions.RequestOptions.mustache Maven / Gradle / Ivy
{{>partial_header}}
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace {{packageName}}.Client
{
///
/// A container for generalized request inputs. This type allows consumers to extend the request functionality
/// by abstracting away from the default (built-in) request framework (e.g. RestSharp).
///
public class RequestOptions
{
///
/// Parameters to be bound to path parts of the Request's URL
///
public Dictionary PathParameters { get; set; }
///
/// Query parameters to be applied to the request.
/// Keys may have 1 or more values associated.
///
public Multimap QueryParameters { get; set; }
///
/// Header parameters to be applied to the request.
/// Keys may have 1 or more values associated.
///
public Multimap HeaderParameters { get; set; }
///
/// Form parameters to be sent along with the request.
///
public Dictionary FormParameters { get; set; }
///
/// File parameters to be sent along with the request.
///
public Dictionary FileParameters { get; set; }
///
/// Cookies to be sent along with the request.
///
public List Cookies { get; set; }
///
/// Any data associated with a request body.
///
public Object Data { get; set; }
///
/// Constructs a new instance of
///
public RequestOptions()
{
PathParameters = new Dictionary();
QueryParameters = new Multimap();
HeaderParameters = new Multimap();
FormParameters = new Dictionary();
FileParameters = new Dictionary();
Cookies = new List();
}
}
}