Mercurial > prosody-modules
comparison mod_component_http/README.markdown @ 2954:1f06a7fe75a8
mod_component_http/README: Include language tag in example to enable syntax highlighting in rendered version
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 26 Mar 2018 16:17:00 +0200 |
parents | 0092bcceda0a |
children |
comparison
equal
deleted
inserted
replaced
2953:0092bcceda0a | 2954:1f06a7fe75a8 |
---|---|
13 Example usage | 13 Example usage |
14 ------------- | 14 ------------- |
15 | 15 |
16 Example echo bot in PHP: | 16 Example echo bot in PHP: |
17 | 17 |
18 ``` | 18 ``` php |
19 <?php | 19 <?php |
20 | 20 |
21 // Receive and decode message JSON | 21 // Receive and decode message JSON |
22 $post_data = file_get_contents('php://input'); | 22 $post_data = file_get_contents('php://input'); |
23 $received = json_decode($post_data)->body; | 23 $received = json_decode($post_data)->body; |