Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit f30c79a

Browse files
authored
Merge pull request #13 from IBM/add_bluemix_log
Update to add Bluemix login step for API Gateway
2 parents 60405d6 + 9c77f8a commit f30c79a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ Now that we have our OpenWhisk actions created, we will expose our OpenWhisk act
8888
This feature is part of the "Bluemix Native API Management" feature and currently supports very powerful API management features like security, rate limiting, and more. For now though we're just using the CLI to expose our action with a REST endpoint. You can read more about this feature here: [API Gateway](https://console.ng.bluemix.net/docs/openwhisk/openwhisk_apigateway.html#openwhisk_apigateway).
8989

9090
```bash
91+
wsk bluemix login --user $YOUR_BLUEMIX_USERNAME --password $YOUR_BLUEMIX_PASSWORD
92+
9193
# POST /v1/cat {"name": "Tahoma", "color": "Tabby"}
9294
wsk api create -n "Cats API" /v1 /cat post create-cat
9395

@@ -100,12 +102,11 @@ In both cases, the CLI will output the URL required to use the API. Make note of
100102
Take note of the API URL that is generated from the previous command. Send an http POST and GET request using CuRL to test the actions. Remember to send the required parameters in the body of the request for POST, or as path parameters for GET. OpenWhisk automatically forwards these parameters to the actions we created.
101103

102104
```bash
103-
104105
# POST /v1/cat {"name": "Tahoma", "color": "Tabby"}
105-
curl -X POST -H 'Content-Type: application/json' -d '{"name":"Tahoma","color":"Tabby"}' <<USE THE URL FROM ABOVE>>
106+
curl -X POST -H 'Content-Type: application/json' -d '{"name":"Tahoma","color":"Tabby"}' $THE_URL_FROM_ABOVE
106107

107108
# GET /v1/cat?id=1
108-
curl <<USE THE URL FROM ABOVE>>?id=1
109+
curl $THE_URL_FROM_ABOVE?id=1
109110
```
110111

111112
# 3. Clean up

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /