GithubHelp home page GithubHelp logo

lunchvote's Introduction

Build Status codecov

LanchVote

Запуск проекта командой mvn jetty:run

Рестораны:

добавить:
curl --request POST \
  --url http://localhost:8080/restaurants \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1' \
  --header 'Content-Type: application/json' \
  --data '{"name":"Sashlik","address":"Palatka"}'
получить все:
curl --request GET \
  --url http://localhost:8080/restaurants \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'
обновить:
curl --request PUT \
  --url http://localhost:8080/restaurants/100005 \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1' \
  --header 'Content-Type: application/json' \
  --data '{"id":100005,"name":"MVC Update","address":"Raduga1"}'
удалить:
curl --request DELETE \
  --url http://localhost:8080/restaurants/100005 \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'
получить по id:
curl --request GET \
  --url http://localhost:8080/restaurants/100004 \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'

Ланчи:

добавить:
curl --request POST \
  --url http://localhost:8080/lunches \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1' \
  --header 'Content-Type: application/json' \
  --data '{"description":"Gamburger","price":45.0,"date":[2018,1,21],"restaurantId":100003}'
получить все:
curl --request GET \
  --url http://localhost:8080/lunches \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'
обновить:
curl --request PUT \
  --url http://localhost:8080/lunches/100006 \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1' \
  --header 'Content-Type: application/json' \
  --data '{"id":100006,"description":"Voper2","price":120.0,"date":[2018,1,21],"restaurantId":100003}'
удалить:
curl --request DELETE \
  --url http://localhost:8080/lunches/100007 \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'
получить по id:
curl --request GET \
  --url http://localhost:8080/lunches/100006 \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'

Голоса:

получить всю статистику за день:
curl --request GET \
  --url http://localhost:8080/vote \
  --header 'Authorization: Basic YWRtaW5AbHVuY2guY29tOjEyMzQ1'
проголосовать\изменить голос:
curl --request POST \
  --url http://localhost:8080/vote/100006 \
  --header 'Authorization: Basic dXNlckBsdW5jaC5jb206cGFzcw=='

Тоже самое но в postman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.