{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/130","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/130/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/130/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/130","id":59374543,"number":130,"title":"Ability to set zero-length content on an HTTP GET request","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Component-HTTP","name":"Component-HTTP","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Milestone-Version1.4.0","name":"Milestone-Version1.4.0","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-01T03:25:39Z","updated_at":"2015-03-01T03:25:41Z","closed_at":"2015-03-01T03:25:39Z","body":"```\nVersion of google-api-java-client (e.g. 1.2.1-alpha)?\n1.3.1-alpha\n\nJava environment (e.g. Java 6, Android 2.2, App Engine 1.3.7)?\nJava 6\n\nDescribe the problem.\nAs  yan...@google.com concerned in Issue 68 ,\"Please don't use \"content-type\" \nheader directly and instead use an instance of HttpContent.If the HttpContent \nof a request is null, we will assume there is no content.\"\n\nbut how to make an instance httpcontent? For example I need make request as \nthis: \nContent-Length=0 Content-Type=text/plain.which httpcontent should I use \nGZip,urlencode or logcontent?\n\nthe other way is use NetHttpRequest,but I can't use NetHttpRequest.setcontent().\n\nHttpRequest request = transport.buildGetRequest();is correct,but HttpRequest \ndoesn't have method setcontent()\n\nNetHttpRequest request = transport.buildGetRequest(); It said \"NetHttpRequest \ncannot be resolved to a type\".When I\nimport com.google.api.client.http.javanet.NetHttpRequest; It said \"The type \ncom.google.api.client.http.javanet.NetHttpRequest is not visible.\"\nThe declaration of NetHttpQequest is \nfinal class NetHttpRequest extends LowLevelHttpRequest \n\n\nHow would you expect it to be fixed?\nwould mend give a sample of googlestorage?\n\nhere is my code:\npublic GoogleStorage(String accessKey,String secret) throws IOException\n\t{\n                //work for fiddle\n\t\t//System.setProperty(\"http.proxyHost\", \"localhost\");\n\t\t//System.setProperty(\"http.proxyPort\", \"8888\");\n\t\t//System.setProperty(\"https.proxyHost\", \"localhost\");\n\t\t//System.setProperty(\"https.proxyPort\", \"8888\");\n\t\t\n\t\ttransport = new NetHttpTransport();\n\t\t GoogleHeaders headers=new GoogleHeaders();\n\t\t transport.defaultHeaders=headers;\n                 //Is this Parser right ? I also want use xmlparser to parser \n                 //response err message.\n\t\t transport.addParser(new JsonCParser());\n\t\t GoogleStorageAuthentication.authorize(transport, accessKey, secret);\n\t\t    \n\t\t\n\t}\n\n\t\n\t\n\tpublic void list() throws IOException\n\t{\n\t\t\t\t\n\t\t\n\t\tHttpRequest request = transport.buildGetRequest();\n\t\t\n\t    request.setUrl(\"http://commondatastorage.googleapis.com\");\n\t    request.headers.put(\"Date\",Now());\n\t    \n\t    //this is not work correct\n\t    //request.headers.put(\"Content-Length\",\"0\");\n\t    //request.headers.put(\"Content-Type\",\"text/plain\");\n\n\t    try {\n\t    \tHttpResponse response = request.execute();\n\t        System.out.println(response.parseAsString());\n\t    }catch (HttpResponseException e){\n                //this is not work correct ,how to parse response err message?\n\t    \tSystem.out.println(e.response.parseAsString()));\n\t    };\n\n\n```\n\nOriginal issue reported on code.google.com by `zcmk...@gmail.com` on 24 Feb 2011 at 3:13"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76568586","html_url":"https://github.com/chrsmith/google-api-java-client/issues/130#issuecomment-76568586","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/130","id":76568586,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T03:25:41Z","updated_at":"2015-03-01T03:25:41Z","body":"\n\nOriginal comment by `yan...@google.com` on 5 Apr 2011 at 7:56\n* Changed state: **Fixed**"}}