/// <summary>
        /// Create a PUT request that sends an object to the API
        /// </summary>
        /// <param name="uri"></param>
        /// <returns></returns>
        private HttpWebRequest CreateRequestPUT(Uri uri, IXmlSerializable value = null)
        {
            HttpWebRequest request = this.CreateRequest(uri, "PUT");

            if (value != null)
            {
                using (StreamWriter writer = new StreamWriter(request.GetRequestStream()))
                {
                    writer.Write(value.ToXmlString());
                }
            }
            else
            {
                request.ContentLength = 0;
            }

            return request;
        }