Retrieve posts list
(event, context)
| 8 | |
| 9 | |
| 10 | def list_posts(event, context): |
| 11 | """ Retrieve posts list """ |
| 12 | url = API_HOST + '/posts' |
| 13 | |
| 14 | log.debug('calling ' + url) |
| 15 | res = requests.get(url) |
| 16 | |
| 17 | response = { |
| 18 | "statusCode": res.status_code, |
| 19 | "body": res.text |
| 20 | } |
| 21 | |
| 22 | return response |
| 23 | |
| 24 | |
| 25 | def get_post(event, context): |
no outgoing calls