Dev2.Runtime.ServiceModel.WebSources.Execute C# (CSharp) Method

Execute() static private method

static private Execute ( WebClient client, string address, WebRequestMethod method, byte data, bool throwError, ErrorResultTO &errors ) : byte[]
client System.Net.WebClient
address string
method WebRequestMethod
data byte
throwError bool
errors Dev2.DataList.Contract.ErrorResultTO
return byte[]
        static byte[] Execute(WebClient client, string address, WebRequestMethod method, byte[] data, bool throwError, out ErrorResultTO errors)
        // ReSharper restore UnusedParameter.Local
        {
            EnsureContentType(client);
            errors = new ErrorResultTO();
            switch(method)
            {
                case WebRequestMethod.Get:
                    return client.DownloadData(address);

                default:
                    return client.UploadData(address, method.ToString().ToUpperInvariant(), data);
            }
        }

Same methods

WebSources::Execute ( WebSource source, WebRequestMethod method, string relativeUri, byte data, bool throwError, ErrorResultTO &errors, string headers = null ) : byte[]
WebSources::Execute ( WebClient client, string address, WebRequestMethod method, string data, bool throwError, ErrorResultTO &errors ) : string
WebSources::Execute ( WebSource source, WebRequestMethod method, string relativeUri, string data, bool throwError, ErrorResultTO &errors, string headers = null ) : string