Esempio n. 1
0
        /// <summary>
        /// Creates the HTTP json request.
        /// </summary>
        /// <param name="self">The self.</param>
        /// <param name="url">The URL.</param>
        /// <param name="method">The method.</param>
        /// <param name="metadata">The metadata.</param>
        /// <param name="credentials">The credentials.</param>
        /// <param name="convention">The document conventions governing this request</param>
        /// <returns></returns>
        public HttpJsonRequest CreateHttpJsonRequest(object self, string url, string method, RavenJObject metadata, ICredentials credentials, DocumentConvention convention)
        {
            var request = new HttpJsonRequest(url, method, metadata, convention);

            ConfigureRequest(self, new WebRequestEventArgs {
                Request = request.webRequest, JsonRequest = request
            });
            return(request);
        }
        public HttpJsonRequest CreateHttpJsonRequest(CreateHttpJsonRequestParams createHttpJsonRequestParams)
        {
            var request = new HttpJsonRequest(createHttpJsonRequestParams, this);

            ConfigureRequest(createHttpJsonRequestParams.Owner, new WebRequestEventArgs {
                Client = request.httpClient, JsonRequest = request, Credentials = createHttpJsonRequestParams.Credentials
            });
            return(request);
        }
Esempio n. 3
0
        public HttpJsonRequest CreateHttpJsonRequest(CreateHttpJsonRequestParams createHttpJsonRequestParams)
        {
            var request = new HttpJsonRequest(createHttpJsonRequestParams, this);

            ConfigureRequest(createHttpJsonRequestParams.Owner, new WebRequestEventArgs {
                Request = request.webRequest, JsonRequest = request
            });
            return(request);
        }
Esempio n. 4
0
        /// <summary>
        /// Creates the HTTP json request.
        /// </summary>
        public HttpJsonRequest CreateHttpJsonRequest(CreateHttpJsonRequestParams createHttpJsonRequestParams)
        {
            var request = new HttpJsonRequest(createHttpJsonRequestParams.Url, createHttpJsonRequestParams.Method, createHttpJsonRequestParams.Metadata, createHttpJsonRequestParams.Convention, this);

            ConfigureRequest(createHttpJsonRequestParams.Self, new WebRequestEventArgs {
                Request = request.webRequest, JsonRequest = request
            });
            return(request);
        }