Exemplo n.º 1
0
        public IHttpRequest Create(Uri uri, HttpMethod method, string acceptMimeType, string requestMimeType = null)
        {
            var httpWebRequest = HttpWebRequestAdapter.CreateHttpWebRequest(uri, method, acceptMimeType, requestMimeType);

            httpWebRequest.ClientCertificates.Add(_clientCertificate);

            return(new HttpWebRequestAdapter(httpWebRequest));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an IHttpRequest that can be used to send an http request.
        /// </summary>
        /// <param name="uri">The location the request is to be sent to.</param>
        /// <param name="method">The method to use to send the request.</param>
        /// <param name="responseMimeType">The Mime type we accept in response.</param>
        /// <param name="requestMimeType">The Mime type we are sending in request.</param>
        /// <returns>The HttpRequest we are creating.</returns>
        public IHttpRequest Create(Uri uri, HttpMethod method, string responseMimeType, string requestMimeType)
        {
            var httpWebRequest = HttpWebRequestAdapter.CreateHttpWebRequest(uri, method, responseMimeType, requestMimeType);

            return(new HttpWebRequestAdapter(httpWebRequest));
        }