-
Notifications
You must be signed in to change notification settings - Fork 1
/
curls.sh
executable file
·35 lines (28 loc) · 1.1 KB
/
curls.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
#TODO asserts
SERVICE_URL=http://localhost:3000
#SERVICE_URL=https://XXXXXXX.execute-api.eu-west-3.amazonaws.com/dev
echo "Create Book:"
curl -H "Content-Type: application/json" -d '{"title":"Conversaciones con CEOs y CIOs sobre Transformación Digital y Metodologías Ágiles","author":"Roberto Canales Mora"}' ${SERVICE_URL}/books
echo
sleep 1
echo "Create Book:"
curl -H "Content-Type: application/json" -d '{"title":"Informática Profesional","author":"Roberto Canales Mora"}' ${SERVICE_URL}/books
echo
sleep 1
echo "Create Book:"
curl -H "Content-Type: application/json" -d '{"title":"Planifica Tu Éxito, De Aprendiz A Empresario","author":"Roberto Canales Mora"}' ${SERVICE_URL}/books
echo
sleep 1
echo "Create Book:"
curl -H "Content-Type: application/json" -d '{"title":"Clean Code","author":"Robert C. Martin"}' ${SERVICE_URL}/books
echo
sleep 1
echo "Get Books:"
echo ${SERVICE_URL}/books
curl -H "Content-Type: application/json" ${SERVICE_URL}/books
echo
echo "Count Authors:"
echo ${SERVICE_URL}/authors/count
curl -H "Content-Type: application/json" ${SERVICE_URL}/authors/count
echo