-
-
Save d00rman/4f25c8609be13d4fb4f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on_setup: | |
- setup_png_storage: | |
request: | |
method: put | |
uri: /{domain}/sys/key_value/postservice.png | |
on_request: | |
- try_storage_and_return: | |
request: | |
method: get | |
headers: | |
cache-control: '{cache-control}' | |
uri: /{domain}/sys/key_value/postservice.png/{hash} | |
return_if: | |
status: [ 200 ] | |
- get_post: | |
request: | |
uri: /{domain}/sys/post_data/postservice/{hash} | |
- new_png: | |
request: | |
method: post | |
uri: http://some.post.service/png | |
body: '{$.get_post.body}' | |
- save_new_png: | |
request: | |
method: put | |
uri: /{domain}/sys/key_value/postservice.png | |
headers: '{$.new_png.headers}' | |
body: '{$.new_png.body}' | |
response: '${$.new_png}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment