8000 Updates the Endpoints Framework Echo sample README · wwb203/python-docs-samples@9e27063 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e27063

Browse files
committed
Updates the Endpoints Framework Echo sample README
Updates formatting. Updates the commands to remove alpha/beta. Adds a section for sending a request to the API.
1 parent fca70b2 commit 9e27063

File tree

1 file changed

+21
-6
lines changed
  • appengine/standard/endpoints-frameworks-v2/echo

1 file changed

+21
-6
lines changed

appengine/standard/endpoints-frameworks-v2/echo/README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,34 @@ Remember to replace [YOUR-PROJECT-ID] with your project ID.
1919

2020
To set up OAuth2, replace `your-oauth-client-id.com` under `audiences` in the annotation for `get_user_email` with your OAuth2 client ID. If you want to use Google OAuth2 Playground, use `407408718192.apps.googleusercontent.com` as your audience. To generate a JWT, go to the following address: `https://developers.google.com/oauthplayground`.
2121

22-
Deploy the generated swagger spec to Google Cloud Service Management: `gcloud alpha service-management deploy echo-v1_swagger.json`
22+
Deploy the generated swagger spec to Google Cloud Service Management: `gcloud service-management deploy echo-v1_swagger.json`
2323

2424
The command returns several lines of information, including a line similar to the following:
2525

26-
Service Configuration [2016-08-01r0] uploaded for service "echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog"
26+
Service Configuration [2016-08-01r0] uploaded for service "echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog"
2727

2828
Open the `app.yaml` file and in the `env_variables` section, replace [YOUR-PROJECT-ID] in `echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog` with your project ID. This is your Endpoints service name. Then replace `2016-08-01r0` with your uploaded service management configuration.
2929

3030
Then, deploy the sample using `gcloud`:
3131

32-
$ gcloud beta app deploy
32+
$ gcloud app deploy
3333

34-
Once deployed, you can access the application at https://your-service.appspot.com
34+
## Sending a request
3535

36-
Note that local deployment with dev_appserver.py is not yet supported with
37-
Endpoints Frameworks v2.
36+
To send a request to the API, from a command line, invoke the following `cURL` command:
37+
38+
curl \
39+
-H "Content-Type: application/json" \
40+
-X POST \
41+
-d '{"content":"echo"}' \
42+
https://[YOUR-PROJECT-ID].appspot.com/_ah/api/echo/v1/echo
43+
44+
You will get a 200 response with the following data:
45+
46+
{
47+
"content": "echo"
48+
}
49+
50+
## Local deployment
51+
52+
Local deployment with dev_appserver.py is not yet supported with Endpoints Frameworks v2.

0 commit comments

Comments
 (0)
0