Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/normalhuman01/app-exchange-rate
https://github.com/normalhuman01/app-exchange-rate
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/normalhuman01/app-exchange-rate
- Owner: normalhuman01
- License: mit
- Created: 2023-12-16T02:04:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-16T02:05:11.000Z (about 1 year ago)
- Last Synced: 2023-12-16T04:33:58.313Z (about 1 year ago)
- Language: Java
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# app-exchange-rate
```python
docker-compose build
``````python
docker-compose up
```Paso 1: Generar token -> [POST] http://localhost:8080/auth/login
```bash
curl --location 'http://localhost:8080/auth/login' \
--header 'Content-Type: application/json' \
--data '{
"username": "user",
"password": "password"
}'```
Paso 2: Cotizar tipo de cambio -> [POST] http://localhost:8080/exchange-rate
```bash
curl --location 'http://localhost:8080/exchange-rate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjk3NTA3NTE0LCJleHAiOjE2OTc1MTExMTR9.gOdxCgGi7jD7FkKIoCQ4LQMTmIF0dH-nsVobD3GEF-ge-JWQqXgRxAzZH29Bq5Sy' \
--data '{
"amount": 50.00,
"currencySource": "USD",
"currencyTarget": "PEN"
}'
```Paso 3: Actualizar tipo de cambio -> [PUT] http://localhost:8080/exchange-rate
```bash
curl --location --request PUT 'http://localhost:8080/exchange-rate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjk3NDg4NDIxLCJleHAiOjE2OTc0OTIwMjF9.roSmQyUe3haoICXUoKQxyD3Sw3gQcBybmgTfYO8kxCbOxcbhycARCXt_hS28g0UK' \
--data '{
"exchangeRateAmount": 3.86,
"currencySource": "USD",
"currencyTarget": "PEN"
}'
```