From 58752d513f6b3e5269712c872b776a14bb00307f Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Sat, 20 Mar 2021 23:03:59 +0300 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9a30fe7..3131a27 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ # go-jsonapi-example -`make && make run` +`make && make run` ## Create a new car: -`curl -X POST http://localhost:8080/v1/cars -d '{"data" : {"type" : "cars" , "attributes": {"brand" : "bmw", "model": "x5", "price": 999, "status": "OnTheWay"}}}'` +`curl -X POST http://localhost:8080/v1/cars -d '{"data" : {"type" : "cars" , "attributes": {"brand" : "bmw", "model": "x5", "price": 999, "status": "OnTheWay"}}}'` ## List cars: -`curl -X GET http://localhost:8080/v1/cars` +`curl -X GET http://localhost:8080/v1/cars` ## List paginated cars: -`curl -X GET 'http://localhost:8080/v1/cars?page\[offset\]=0&page\[limit\]=2'` -**OR** -`curl -X GET 'http://localhost:8080/v1/cars?page\[number\]=1&page\[size\]=2'` +`curl -X GET 'http://localhost:8080/v1/cars?page\[offset\]=0&page\[limit\]=2'` +**OR** +`curl -X GET 'http://localhost:8080/v1/cars?page\[number\]=1&page\[size\]=2'` ## Update: -`curl -X PATCH http://localhost:8080/v1/cars/1 -d '{ "data" : {"type" : "cars", "id": "1", "attributes": {"model" : "x3"}}}'` +`curl -X PATCH http://localhost:8080/v1/cars/1 -d '{ "data" : {"type" : "cars", "id": "1", "attributes": {"model" : "x3"}}}'` ## Delete: -`curl -X DELETE http://localhost:8080/v1/cars/2` +`curl -X DELETE http://localhost:8080/v1/cars/2`