11장. curl로 HTTP를 가장 작은 재현으로 만든다
--fail-with-body --silent --show-error로 script 실패와 body를 함께 보며 method/header/body를 명시한다. curl man page는 verbose/trace 출력에 credential과 secret이 포함될 수 있다고 경고한다.
curl --fail-with-body --silent --show-error
-X POST http://127.0.0.1:8080/api/checkouts
-H 'Content-Type: application/json'
-H 'Idempotency-Key: demo-order-1042'
--data '{"cartId":"cart-1042","paymentMethod":"test-token"}'
실제 Bearer token을 command line에 쓰면 process list와 history에 남을 수 있다. 승인된 secret injection을 쓰고 debug output을 공유하지 않는다.