Here is the code I'm using to test this (it's in C#). I'm using the
same code as all of my other tests that are working.

//docID: "df2qg349_240cstz2shf"
//type: "document"
private static string EditMetaData(string docID, string type)
        {
            try
            {
                //this gets my Client Auth string
                string auth = Authenticate();

                //Create a web request for the Google ClientLogin
service
                HttpWebRequest authRequest = (HttpWebRequest)
HttpWebRequest.Create("http://docs.google.com/feeds/documents/private/
full/" + type + "%3A" + docID);
                authRequest.KeepAlive = false;
                authRequest.ContentType = "application/atom+xml";

                authRequest.Method = "PUT";
                authRequest.Headers.Add("Authorization: GoogleLogin
auth=" + auth);

                //Build the POST data
                string postBuilder = "<?xml version='1.0'
encoding='UTF-8'?><atom:entry xmlns:atom='http://www.w3.org/2005/
Atom'><atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/docs/2007#document' label='document'/
><atom:title>change title</atom:title></atom:entry>";

                //Convert the POST data to a byte[]
                byte[] data = ASCIIEncoding.ASCII.GetBytes
(postBuilder);
                authRequest.ContentLength = data.Length;

                //Get the request stream and POST the data
                Stream requestStream = authRequest.GetRequestStream();
                requestStream.Write(data, 0, data.Length);
                requestStream.Close();

                //Get the response
                HttpWebResponse authResponse = (HttpWebResponse)
authRequest.GetResponse();
                Stream responseStream = authResponse.GetResponseStream
();
                StreamReader responseReader = new StreamReader
(responseStream);

                string response = responseReader.ReadToEnd();

                //close streams
                responseReader.Close();
                responseStream.Close();
                authResponse.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine("");
                Console.WriteLine(ex.StackTrace);
            }
        }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to