diff options
| author | luisgulo <luisgulo@gmail.com> | 2025-10-24 18:01:10 +0200 |
|---|---|---|
| committer | luisgulo <luisgulo@gmail.com> | 2025-10-24 18:01:10 +0200 |
| commit | 533e79ba959143f0459431a486bfb85c56c72ddc (patch) | |
| tree | 91974de1bbbdc4c51c76ed591fc5c6e02a3342b6 /examples/api_body_test.yaml | |
| parent | 45019c81cfd0fc1d18dce18cdfd5f127c6d61073 (diff) | |
Releasing code version 1.8.0
Diffstat (limited to 'examples/api_body_test.yaml')
| -rw-r--r-- | examples/api_body_test.yaml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/examples/api_body_test.yaml b/examples/api_body_test.yaml new file mode 100644 index 0000000..fe0578f --- /dev/null +++ b/examples/api_body_test.yaml @@ -0,0 +1,62 @@ +tasks: + - name: POST simple con campos planos + module: api + args: + method: post + url: https://reqres.in/api/users + body: | + {"name":"Luis","job":"ShFlow tester"} + headers: x-api-key:reqres-free-v1,Content-Type:application/json + parse: json + + - name: POST con estructura anidada + module: api + args: + method: post + url: https://httpbin.org/post + body: | + { + "title": "Test", + "tags": ["bash", "api", "flow"], + "meta": { + "author": "Luis", + "version": "1.0" + } + } + headers: Content-Type:application/json + parse: json + + - name: POST con cuerpo vacío + module: api + args: + method: post + url: https://httpbin.org/post + body: "" + headers: Content-Type:application/json + parse: json + + - name: POST con caracteres especiales + module: api + args: + method: post + url: https://httpbin.org/post + body: | + {"mensaje":"¡Hola desde ShFlow! 🎉 Ñandú con tilde y ñ"} + headers: Content-Type:application/json + parse: json + + - name: POST con array de objetos + module: api + args: + method: post + url: https://httpbin.org/post + body: | + { + "usuarios": [ + {"nombre": "Luis", "rol": "admin"}, + {"nombre": "Ana", "rol": "tester"} + ] + } + headers: Content-Type:application/json + parse: json + |
