Giter VIP home page Giter VIP logo

vertxed's Introduction

vertxed

small REST api using vertx tool-​kit

Endpoints

  • GET /api/movies
  • GET /api/movies/:id
  • POST /api/movies
  • PUT /api/movies/:id
  • DELETE /api/movies/:id

Runable by

docker-compose up

Example requests

token=$(curl --request POST --data '{"user_name":"marco","user_password":"secret"}' http://localhost:8080/login)
curl --request GET  -H "Authorization: Bearer $token" http://localhost:8080/protected/api/movies
curl --request GET  -H "Authorization: Bearer $token" http://localhost:8080/protected/api/movies/626b0ab4bcee077d94958c59
curl --request POST -H "Authorization: Bearer $token"  --data '{"name":"xyz","rate":"7.1"}' http://localhost:8080/protected/api/movies
curl --request PUT  -H "Authorization: Bearer $token"  --data '{"name":"wxyz","rate":"7.2"}' http://localhost:8080/protected/api/movies/626b0ab4bcee077d94958c59
curl --request DELETE -H "Authorization: Bearer $token" http://localhost:8080/protected/api/movies/626b0ab4bcee077d94958c59

GET Request Example

[ {
  "id" : "5ca4f682358fa940d6ddcb3a",
  "name" : "The Shawshank Redemption",
  "rate" : "9.3"
}, {
  "id" : "5ca4f682358fa940d6ddcb3b",
  "name" : "The Godfather",
  "rate" : "9.2"
}, {
  "id" : "5ca51fc975b271782980e1f8",
  "name" : "The",
  "rate" : "9.332"
} ]

vertxed's People

Contributors

mhero avatar dependabot[bot] avatar oneandonlymark avatar snyk-bot avatar

Watchers

James Cloos avatar  avatar

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.