Skip to content

conorheffron/cart-dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cart-dart

Dart

Add dependencies

dart pub add shelf

Install dependencies

dart pub get

Run Tests

dart test

Run Server

dart run bin/main.dart

Post Item 1

(base) cart-dart % curl -X POST http://localhost:8080/cart \
-H "Content-Type: application/json" \
-d '{"productId": "123", "quantity":5}'

Item added to cart%          

View Cart

(base) cart-dart % curl -X GET http://localhost:8080/cart

[{"productId":"123","quantity":5}]%   

Post Item 2

(base) cart-dart % curl -X POST http://localhost:8080/cart \
-H "Content-Type: application/json" \
-d '{"productId": "732", "quantity":7}'

Item added to cart%      

View Cart

(base) cart-dart % curl -X GET http://localhost:8080/cart

[{"productId":"123","quantity":5},{"productId":"732","quantity":7}]%

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages