public void deployArtifact(DeployDetails details)
        {
            string deploymentPath = String.IsNullOrEmpty(details.targetRepository) ? _artifactoryUrl + "/" + details.artifactPath : _artifactoryUrl + "/" + details.targetRepository + "/" + details.artifactPath;
            _log.Info("Deploying artifact: " + deploymentPath);

            if (tryChecksumDeploy(details, _artifactoryUrl))
            {
                return;
            }

            //Custom headers
            WebHeaderCollection headers = new WebHeaderCollection();
            headers = createHttpPutMethod(details);
            headers.Add(HttpRequestHeader.ContentType, "binary/octet-stream");

            /*
             * "100 (Continue)" status is to allow a client that is sending a request message with a request body to determine if the origin server is
             *  willing to accept the request (based on the request headers) before the client sends the request body.
             */
            //headers.Add("Expect", "100-continue");

            _httpClient.getHttpClient().setHeader(headers);

            byte[] data = File.ReadAllBytes(details.file.FullName);

            /* Add properties to the artifact, if any */
            deploymentPath = deploymentPath + details.properties;

            HttpResponse response = _httpClient.getHttpClient().execute(deploymentPath, "PUT", data);

            ///When deploying artifact, Expecting for Created (201) response from Artifactory
            if ((response._statusCode != HttpStatusCode.OK) && (response._statusCode != HttpStatusCode.Created))
            {
                _log.Error("Error occurred while publishing artifact to Artifactory: " + details.file);
                throw new WebException("Failed to deploy file:" + response._message);
            }
        }
        /// <summary>
        ///  Deploy an artifact to the specified destination by checking if the artifact content already exists in Artifactory
        /// </summary>
        private Boolean tryChecksumDeploy(DeployDetails details, String uploadUrl)
        {
            // Try checksum deploy only on file size greater than CHECKSUM_DEPLOY_MIN_FILE_SIZE
            if (details.file.Length < CHECKSUM_DEPLOY_MIN_FILE_SIZE) {
                _log.Debug("Skipping checksum deploy of file size " + details.file.Length + " , falling back to regular deployment.");
                return false;
            }

            string checksumUrlPath = uploadUrl + "/" + details.targetRepository + "/" + details.artifactPath;

            /* Add properties to the artifact, if any */
            checksumUrlPath = checksumUrlPath + details.properties;

            WebHeaderCollection headers = createHttpPutMethod(details);
            headers.Add("X-Checksum-Deploy", "true");
            headers.Add(HttpRequestHeader.ContentType, "application/vnd.org.jfrog.artifactory.storage.ItemCreated+json");

            _httpClient.getHttpClient().setHeader(headers);
            HttpResponse response = _httpClient.getHttpClient().execute(checksumUrlPath, "PUT");

            ///When sending Checksum deploy, Expecting for Created (201) or Success (200) responses from Artifactory
            if (response._statusCode == HttpStatusCode.Created || response._statusCode == HttpStatusCode.OK)
            {

                _log.Debug(string.Format("Successfully performed checksum deploy of file {0} : {1}", details.file.FullName, details.sha1));
                return true;
            }
            else
            {
                _log.Debug(string.Format("Failed checksum deploy of checksum '{0}' with statusCode: {1}", details.sha1, response._statusCode));
            }

            return false;
        }
        /// <summary>
        /// Typical PUT header with Checksums, for deploying files to Artifactory 
        /// </summary>
        private WebHeaderCollection createHttpPutMethod(DeployDetails details)
        {
            WebHeaderCollection putHeaders = new WebHeaderCollection();
            putHeaders.Add("X-Checksum-Sha1", details.sha1);
            putHeaders.Add("X-Checksum-Md5", details.md5);

            return putHeaders;
        }