From 23e4f52284ad5fa0b068220c54a255ff9fa7b18f Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 13 Apr 2021 20:37:54 +0300 Subject: Add verbose error messages Not happy with the solution one bit but using error.rs at https://blog.logrocket.com/create-an-async-crud-web-service-in-rust-with-warp/ was not working Basically we just handcraft every single response on the spot, there is some repetition and it's ugly but need to move on --- tester.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tester.sh') diff --git a/tester.sh b/tester.sh index 67b997a..44bd8de 100755 --- a/tester.sh +++ b/tester.sh @@ -26,6 +26,7 @@ curl --request POST \ curl --request POST \ --header 'Content-Type: application/json' \ --data '{ + "by": "old_transaction_hash_1", "source": "old_transaction_hash_1", "target": "target_account", "amount": 20, @@ -35,7 +36,7 @@ curl --request POST \ ## new transaction curl --request POST \ - --header 'Content-Type: application/json' \ + --header 'Content-Length: 36864' \ --data '{ "source": "old_transaction_hash_2", "target": "target_account", @@ -47,7 +48,9 @@ curl --request POST \ ## new transaction curl --request POST \ --header 'Content-Type: application/json' \ + --header 'Authorization: Bearer arstarst.arstarst.arstarst' \ --data '{ + "by": "e254275", "source": "old_transaction_hash_3", "target": "target_account", "amount": 20, @@ -60,6 +63,7 @@ printf "\n\nList of current transactions\n\n" curl localhost:8080/transaction curl --header "Content-Type: application/json" \ + --header "Authorization: aaa.bbb.ccc" \ --request POST \ --data '{ "transaction_list": [ @@ -67,7 +71,7 @@ curl --header "Content-Type: application/json" \ "old_transaction_hash_2", "old_transaction_hash_3" ], - "nonce": "not_a_thing_yet", + "nonce": 0, "timestamp": "2021-04-08T12:30:30", "hash": "not_a_thing_yet" }' \ -- cgit v1.2.3-70-g09d2