https://github.com/uditdc/bls-example-stdin-vars
https://github.com/uditdc/bls-example-stdin-vars
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uditdc/bls-example-stdin-vars
- Owner: uditdc
- Created: 2023-08-16T16:14:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-17T07:06:49.000Z (almost 3 years ago)
- Last Synced: 2025-04-13T10:59:16.609Z (about 1 year ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blockless Stdin over HTTP
This is a sample blockless app demonstrating STDIN over Http.
### Locally
Run the following command:
`bls functions invoke --stdin your-stdin-input`
Result:
`stdinString: your-stdin-input`
### Via PATH
Run the following command:
```
curl -X GET \
https://example-stdin-vars-8ceb538e.rc2.bls.dev/your-stdin-from-path
```
Result:
`stdinString: /your-stdin-from-path`
### Via GET
Run the following command:
```
curl -X GET \
https://example-stdin-vars-8ceb538e.rc2.bls.dev?stdin=your-stdin-input-from-get
```
Result:
`stdinString: your-stdin-input-from-get`
### Via POST
Run the following command:
```
curl -X POST \
-H "Content-Type: text/plain" \
-d 'your-stdin-input-from-post' \
https://example-stdin-vars-8ceb538e.rc2.bls.dev
```
Result:
`stdinString: your-stdin-input-from-post`
### Via POST using application/json
Run the following command:
```
curl -X POST \
-H "Content-Type: application/json" \
-d '{"stdin": "your-stdin-input-from-post-json"}' \
https://example-stdin-vars-8ceb538e.rc2.bls.dev
```
Result:
`stdinString: your-stdin-input-from-post-json`
## Connecting via rc2.bls.dev
Using the Blockless CLI, login via:
`bls login -u rc2.bls.dev`