Thanks Michael :-) I will post there.

2015年3月12日木曜日 3時06分51秒 UTC+9 Michael:
>
> This sort of programming/development question would be better directed to 
> Stack 
> Overflow's App Engine tag 
> <http://stackoverflow.com/questions/tagged/google-app-engine>. I 
> recommend posting there for more technical issues as it is more likely that 
> you will get a solution to your problem.
>
> On Wednesday, March 11, 2015 at 6:20:40 AM UTC-4, [email protected] 
> wrote:
>>
>> I can get the response from Google API's via web browser. It is say,
>>
>> Access to 
>>
>>
>> https://www.googleapis.com/blogger/v3/blogs/4871538073781423026?access_token=XXXXXXXX
>>
>> by some web browser, and get response
>>
>> {
>>  "kind": "blogger#blog",
>>  "id": "4871538073781423026",
>>  "name": "SoffeeShop",
>>  "description": "",
>>  "published": "2012-10-24T23:55:32+09:00",
>>  "updated": "2015-03-04T14:31:00+09:00",
>>  "url": "http://soffeeshop.blogspot.com/";,
>>  "selfLink": 
>> "https://www.googleapis.com/blogger/v3/blogs/4871538073781423026";,
>>  "posts": {
>>   "totalItems": 58,
>>   "selfLink": 
>> "https://www.googleapis.com/blogger/v3/blogs/4871538073781423026/posts";
>>  },
>>  "pages": {
>>   "totalItems": 0,
>>   "selfLink": 
>> "https://www.googleapis.com/blogger/v3/blogs/4871538073781423026/pages";
>>  },
>>  "locale": {
>>   "language": "en",
>>   "country": "",
>>   "variant": ""
>>  }
>> }
>>
>>
>> Although, when I do REST in the servlet in GAE, like
>>
>>
>> URL url = new 
>> URL("https://www.googleapis.com/blogger/v3/blogs/4871538073781423026?access_token=XXXXXXXXX";);
>> HttpURLConnection connection = (HttpURLConnection) url.openConnection();
>> connection.setRequestMethod("GET");
>> connection.setRequestProperty("X-Appengine-Inbound-Appid", "XXXXX");
>> connection.setRequestProperty("Accept", "application/json");
>> connection.setRequestProperty("Host", "googleapis.com");
>>
>>
>> or
>>
>>
>> URL url = new 
>> URL("https://www.googleapis.com/blogger/v3/blogs/4871538073781423026);
>> HttpURLConnection connection = (HttpURLConnection) url.openConnection();
>> connection.setRequestMethod("GET");
>>
>> connection.setRequestProperty("Authorization", "Bearer " + access_token); 
>>
>> connection.setRequestProperty("X-Appengine-Inbound-Appid", "XXXXX"); 
>> connection.setRequestProperty("Accept", "application/json"); 
>> connection.setRequestProperty("Host", "googleapis.com");
>>
>>
>> i just got "404 Not Found" Error. 
>>
>>
>> I could get access_token with OAuth2 using HttpURLConnection in the same 
>> servlet in GAE, just could not do access to google API's. So, it's mean Http 
>> Connections are working well to access to other servers.
>>
>>
>> Why I could not access only Google API's via servlet in GAE? Please help 
>> me...
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/3833eb61-a4a4-4d4c-bff4-66feb87d978f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to