Hi Ray,
As mentioned by Tiago, you will be better assisted on StackOverflow 
<https://stackoverflow.com/questions/tagged/google-app-engine> as Google 
Groups are more oriented towards general opinions, trends, and issues of 
general nature touching App Engine.

On Thursday, August 15, 2019 at 3:35:12 AM UTC-4, Ray Wong wrote:
>
> Thanks for your reply! The previous way to get data using AngularJS $http. 
> Some code is like this:
> dashboard_app.factory('DashboardDataFetching', function($location, $http) {
>   return {
>     'GetArticleProgress': function(article_urlsafe, call_back) {
>       $http.post("/_api/get_progress", JSON.stringify({
>         'article_urlsafe': article_urlsafe
>       })).then(call_back);
>     },
>   }
> });
>
> The key issue is that without using JavaScript client library(
> https://apis.google.com/js/client.js), I can't get the call_back. That is 
> to say, I can't access the url successfully without it while others have no 
> problem. Is there any way to slove this please?  
>
> 在 2019年8月14日星期三 UTC+8上午9:50:14,Tiago (Google Cloud Platform Support)写道:
>>
>> Thank you for using Google Groups!
>>
>> Passing data between a backend and frontend service differs depending on 
>> the language and/or framework you are using. Should you be adopting a 
>> RESTful backend architecture in Python such as Flask, you can define a 
>> route handler, hit it with a GET request using the Fetch API 
>> <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch> 
>> from JavaScript, and then have the data returned using the response object 
>> in your 'main.py' file.
>>
>> You can follow this tutorial 
>> <https://flask.palletsprojects.com/en/1.1.x/tutorial/> on how to write 
>> route handlers using Flask that you can then hit using the Fetch API 
>> <https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch> 
>> from JavaScript, and have data returned from the backend service to the 
>> frontend service. 
>>
>> Furthermore, you can use the GCP Flask tutorial 
>> <https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/flask/tutorial>
>>  to 
>> get you started.
>>
>> Finally, these types of questions are better addressed on StackOverflow 
>> where you have access to a large community of enthusiasts and experts to 
>> share ideas with and get support from. Please make sure to include all 
>> relevant details and error messages which would help the community 
>> troubleshoot.
>>
>> On Monday, August 12, 2019 at 2:22:09 PM UTC-4, Ray Wong wrote:
>>>
>>> At present I deploy my gae project on appscale. I want to  pass data to 
>>> html page. I know a simple way is to use Google JavaScript Library. But for 
>>> some reason, the https://apis.google.com/js/client.js is blocked and I 
>>> can't use this library.  So I want to ask are there other ways to get  
>>> backend data(written in python) for javascript page. Thanks!  
>>>
>>

-- 
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 google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e88f1501-bce1-41aa-bb4c-0b103382ef5a%40googlegroups.com.
  • [google-ap... Ray Wong
    • [goog... 'Tiago (Google Cloud Platform Support)' via Google App Engine
      • [... Ray Wong
        • ... 'Nicolas (Google Cloud Platform Support)' via Google App Engine

Reply via email to