From 94a4c12e92723b509ee766332e4499ca155488e2 Mon Sep 17 00:00:00 2001 From: Mohamed Meabed Date: Sun, 30 Sep 2018 11:37:43 +0400 Subject: [PATCH] Update readme --- README.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a0d9e05..c34d296 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,39 @@ and optionally cache the results. heroku test instance @ https://go-swap-server.herokuapp.com -##### /GET Examples: +#### /GET Examples for single exchanger: - [GET /convert?from=USD&to=AED&amount=2&exchanger=yahoo](https://go-swap-server.herokuapp.com/convert?from=USD&to=AED&amount=100&exchanger=yahoo) - [GET /convert?from=EUR&to=GBP&amount=1&exchanger=google](https://go-swap-server.herokuapp.com/convert?from=EUR&to=GBP&amount=100&exchanger=google) - [GET /convert?from=EUR&to=GBP&amount=1&exchanger=themoneyconverter](https://go-swap-server.herokuapp.com/convert?from=EUR&to=GBP&amount=100&exchanger=themoneyconverter) -##### /POST Examples: -```bash - -``` +#### /POST Examples for single or multi exchanger: +- Check [SwaggerUI](https://go-swap-server.herokuapp.com/swagger) +- CURL examples: + ```bash + curl -X POST \ + https://go-swap-server.herokuapp.com/convert \ + -H 'Content-Type: application/json' \ + -d '{ + "amount": 2.5, + "from": "USD", + "to": "AED", + "decimalPoints": 4, + "cacheTime": "120s", + "exchanger": [ + { + "name": "yahoo" + }, + { + "name": "google" + }, + { + "name": "themoneyconverter", + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" + } + ] + }' + ``` +- Postman Collection [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/e721b5007e2df03f1cac) ## QuickStart