Steps to reproduce issue:

HttpRequest request = transport.buildPostRequest();

GoogleHeaders headers = (GoogleHeaders) transport.defaultHeaders;

headers.contentType = "application/atom+xml";


GoogleUrl url = new GoogleUrl(listURL);

request.url = url;


String c =

// "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +

"<entry xmlns=\"http://www.w3.org/2005/Atom\""+

"xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\";>"+

"<gsx:hello>1</gsx:hello>" + "</entry>";


InputStreamContent content = new InputStreamContent();

content.setByteArrayInput(c.getBytes());

content.type = "application/atom+xml";

request.content = content;


try {

System.out.println(request.execute().parseAsString());


Expected output:

row inserted into spreadsheet

Actual results:

400 bad request...

I am certain that the Authtoken is correct/valid and the POST url is 
correct...but I am not sure why I keep getting 400 bad request

is there another way to create HttpContent from a "raw" XML string?...

any help would be appreciated 


this is the URL that i am using (ABCDEFG is the key)
https://spreadsheets.google.com/feeds/list/ABCDEFG/od6/private/full

Vic, this is already HTTPS...


thanks

Reply via email to