Skip to content

Commit 48d7f61

Browse files
fix: Chang /ping path to /time in several examples (#668)
1 parent b00b9c8 commit 48d7f61

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

aws-java-simple-http-endpoint/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
title: 'AWS Simple HTTP Endpoint example in Java'
3-
description: 'This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you ping it, it will reply with the current time.'
3+
description: 'This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you fetch it, it will reply with the current time.'
44
layout: Doc
55
framework: v1
66
platform: AWS
@@ -12,7 +12,7 @@ authorAvatar: 'https://avatars3.githubusercontent.com/u/1767769?v=4&s=140'
1212
-->
1313
# Simple HTTP Endpoint Example
1414

15-
This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you ping it, it will reply with the current time.
15+
This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you fetch it, it will reply with the current time.
1616

1717
[Jackson](https://github.com/FasterXML/jackson) is used to serialize objects to JSON.
1818

@@ -110,7 +110,7 @@ region: us-east-1
110110
api keys:
111111
None
112112
endpoints:
113-
GET - https://XXXXXXX.execute-api.us-east-1.amazonaws.com/ping
113+
GET - https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
114114
functions:
115115
aws-java-simple-http-endpoint-dev-currentTime: arn:aws:lambda:us-east-1:XXXXXXX:function:aws-java-simple-http-endpoint-dev-currentTime
116116

@@ -146,7 +146,7 @@ REPORT RequestId: XXXXXXX Duration: 0.51 ms Billed Duration: 100 ms Memory Size
146146
Finally you can send an HTTP request directly to the endpoint using a tool like curl
147147

148148
```bash
149-
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/ping
149+
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
150150
```
151151

152152
The expected result should be similar to:

aws-java-simple-http-endpoint/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ functions:
1313
handler: com.serverless.Handler
1414
events:
1515
- httpApi:
16-
path: /ping
16+
path: /time
1717
method: get

aws-node-simple-http-endpoint/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
title: 'AWS Simple HTTP Endpoint example in NodeJS'
3-
description: 'This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time.'
3+
description: 'This example demonstrates how to setup a simple HTTP GET endpoint. Once you fetch it, it will reply with the current time.'
44
layout: Doc
55
framework: v1
66
platform: AWS
@@ -12,7 +12,7 @@ authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
1212
-->
1313
# Simple HTTP Endpoint Example
1414

15-
This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time. While the internal function is name `currentTime` the HTTP endpoint is exposed as `ping`.
15+
This example demonstrates how to setup a simple HTTP GET endpoint. Once you fetch it, it will reply with the current time. While the internal function is name `currentTime` the HTTP endpoint is exposed as `time`.
1616

1717
## Use Cases
1818

@@ -61,7 +61,7 @@ region: us-east-1
6161
api keys:
6262
None
6363
endpoints:
64-
GET - https://2e16njizla.execute-api.us-east-1.amazonaws.com/ping
64+
GET - https://2e16njizla.execute-api.us-east-1.amazonaws.com/time
6565
functions:
6666
serverless-simple-http-endpoint-dev-currentTime: arn:aws:lambda:us-east-1:488110005556:function:serverless-simple-http-endpoint-dev-currentTime
6767
```
@@ -77,7 +77,7 @@ serverless invoke --function currentTime --log
7777
or as send an HTTP request directly to the endpoint using a tool like curl
7878

7979
```bash
80-
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/ping
80+
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
8181
```
8282

8383
## Scaling

aws-node-simple-http-endpoint/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ functions:
1010
handler: handler.endpoint
1111
events:
1212
- httpApi:
13-
path: /ping
13+
path: /time
1414
method: get

aws-python-simple-http-endpoint/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
title: 'AWS Simple HTTP Endpoint example in Python'
3-
description: 'This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time.'
3+
description: 'This example demonstrates how to setup a simple HTTP GET endpoint. Once you fetch it, it will reply with the current time.'
44
layout: Doc
55
framework: v1
66
platform: AWS
@@ -12,7 +12,7 @@ authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
1212
-->
1313
# Simple HTTP Endpoint Example
1414

15-
This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time. While the internal function is name `currentTime` the HTTP endpoint is exposed as `ping`.
15+
This example demonstrates how to setup a simple HTTP GET endpoint. Once you fetch it, it will reply with the current time. While the internal function is name `currentTime` the HTTP endpoint is exposed as `time`.
1616

1717
## Use Cases
1818

@@ -42,7 +42,7 @@ region: us-east-1
4242
api keys:
4343
None
4444
endpoints:
45-
GET - https://f7r5srabr3.execute-api.us-east-1.amazonaws.com/ping
45+
GET - https://f7r5srabr3.execute-api.us-east-1.amazonaws.com/time
4646
functions:
4747
currentTime: aws-python-simple-http-endpoint-dev-currentTime
4848
```
@@ -71,7 +71,7 @@ REPORT RequestId: a26699d3-b3ee-11e6-98f33f952e8294 Duration: 0.23 ms Billed Dur
7171
Finally you can send an HTTP request directly to the endpoint using a tool like curl
7272

7373
```bash
74-
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/ping
74+
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
7575
```
7676

7777
The expected result should be similar to:

aws-python-simple-http-endpoint/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ functions:
1010
handler: handler.endpoint
1111
events:
1212
- httpApi:
13-
path: /ping
13+
path: /time
1414
method: get

aws-ruby-simple-http-endpoint/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
title: .'AWS Simple HTTP Endpoint example in Ruby'
3-
description: 'This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time.'
3+
description: 'This example demonstrates how to setup a simple HTTP GET endpoint. Once you fetch it, it will reply with the current time.'
44
framework: v1
55
platform: AWS
66
language: Ruby
@@ -47,7 +47,7 @@ stack: serverless-ruby-simple-http-endpoint-dev
4747
api keys:
4848
None
4949
endpoints:
50-
GET - https://spmfbzc6ja.execute-api.us-east-1.amazonaws.com/ping
50+
GET - https://spmfbzc6ja.execute-api.us-east-1.amazonaws.com/time
5151
functions:
5252
current_time: serverless-ruby-simple-http-endpoint-dev-current_time
5353
layers:
@@ -59,7 +59,7 @@ Serverless: Removing old service artifacts from S3...
5959
Send an HTTP request directly to the endpoint using a tool like curl:
6060

6161
```bash
62-
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/ping
62+
curl https://XXXXXXX.execute-api.us-east-1.amazonaws.com/time
6363
```
6464

6565
## Scaling

aws-ruby-simple-http-endpoint/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ functions:
1010
handler: handler.endpoint
1111
events:
1212
- httpApi:
13-
path: /ping
13+
path: /time
1414
method: get

openwhisk-python-simple-http-endpoint/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Make a note of the API endpoint that is logged to the console during deployment.
2626

2727
```
2828
endpoints:
29-
GET https://xxx.api-gw.mybluemix.net/python-service/ping --> python-service-dev-currentTime
29+
GET https://xxx.api-gw.mybluemix.net/python-service/time --> python-service-dev-currentTime
3030
```
3131

3232
## 3. Invoke deployed function
@@ -49,14 +49,14 @@ be the API gateway root path, logged during deployment, and your configured
4949
function path.
5050

5151
```
52-
$ http get https://xxx.api-gw.mybluemix.net/python-service/ping
52+
$ http get https://xxx.api-gw.mybluemix.net/python-service/time
5353
HTTP/1.1 200 OK
5454
...
5555
{
5656
"message": "Hello stranger, the current time is 16:00:11.837331"
5757
}
5858
59-
$ http get https://xxx.api-gw.mybluemix.net/python-service/ping?name=James
59+
$ http get https://xxx.api-gw.mybluemix.net/python-service/time?name=James
6060
HTTP/1.1 200 OK
6161
...
6262
{

openwhisk-python-simple-http-endpoint/serverless.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ functions:
99
handler: handler.endpoint
1010
events:
1111
- http:
12-
path: ping
12+
path: time
1313
method: get
1414

1515
plugins:

openwhisk-swift-simple-http-endpoint/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Make a note of the API endpoint that is logged to the console during deployment.
2626

2727
```
2828
endpoints:
29-
GET https://xxx.api-gw.mybluemix.net/swift-service/ping --> swift-service-dev-ping
29+
GET https://xxx.api-gw.mybluemix.net/swift-service/time --> swift-service-dev-time
3030
```
3131

3232
## 3. Invoke deployed function
33-
`serverless invoke --function ping` or `serverless invoke -f ping`
33+
`serverless invoke --function time` or `serverless invoke -f time`
3434

3535
`-f` is shorthand for `--function`
3636

@@ -49,14 +49,14 @@ be the API gateway root path, logged during deployment, and your configured
4949
function path.
5050

5151
```
52-
$ http get https://xxx.api-gw.mybluemix.net/swift-service/ping
52+
$ http get https://xxx.api-gw.mybluemix.net/swift-service/time
5353
HTTP/1.1 200 OK
5454
...
5555
{
5656
"message": "Hello stranger, the current time is 16:00:11.837331"
5757
}
5858
59-
$ http get https://xxx.api-gw.mybluemix.net/swift-service/ping?name=James
59+
$ http get https://xxx.api-gw.mybluemix.net/swift-service/time?name=James
6060
HTTP/1.1 200 OK
6161
...
6262
{

openwhisk-swift-simple-http-endpoint/serverless.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ provider:
55
runtime: swift
66

77
functions:
8-
ping:
9-
handler: ping.main
8+
time:
9+
handler: time.main
1010
events:
1111
- http:
12-
path: ping
12+
path: time
1313
method: get
1414

1515

0 commit comments

Comments
 (0)