Пример #1
0
        /// <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;
        }
Пример #2
0
        private Uri ConstructUri()
        {
            var uri = new Uri(Host, Path);

            return((AsUser == null) ? uri : AsUser.AppendQuery(uri));
        }
Пример #3
0
 /// <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)
 {
 }