/// <summary> /// Instantiates a new Box request with the provided host URI and path /// </summary> /// <param name="hostUri"></param> /// <param name="path"></param> public ApiRequest(Uri hostUri, string path, AsUser asUser) { Host = hostUri; Path = path; AsUser = asUser; HttpHeaders = new Dictionary <string, string>(); Parameters = new Dictionary <string, string>(); PayloadParameters = new Dictionary <string, string>(); // Initialize Defaults ContentEncoding = Encoding.UTF8; }
private Uri ConstructUri() { var uri = new Uri(Host, Path); return((AsUser == null) ? uri : AsUser.AppendQuery(uri)); }
/// <summary> /// Instantiates a new Box request with the provided host URI /// </summary> /// <param name="hostUri"></param> public ApiRequest(Uri hostUri, AsUser asUser) : this(hostUri, string.Empty, asUser) { }