Giter VIP home page Giter VIP logo

frodo's Introduction

FRODO

Frodo is a simple wanderer which you can order to execute some action and expect a result. The possible actions are:

  • info - just to check if the app works
  • talk - frodo says hello and his name
  • inventory - ability to store objects
    • ring inventory - only a single ring exists, can't be taken unless with the force parameter, won't be shown unless the friend parameter exists

This is just my private playground prepared to remind myself on how to develop dropwizard apps.

##Sample Commands

  • Info resource: curl 'localhost:8080/' -v
  • Talk resource:
    • to get a simple hello from Frodo asking for your name: curl 'localhost:8080/talk' -v
    • to get a hello from Frodo with your name: curl 'localhost:8080/talk?name=Kris' -v
  • Inventory resource (guarded with http basic auth):
    • to get all elements in inventory: curl 'localhost:8080/inventory' -v --user user:pass
    • to save a single element in inventory: curl 'localhost:8080/inventory' -v -XPOST -H 'Content-type: application/json' -d '{"name":"Lembas bread", "description":"some elvish shit"}' --user user:pass
    • to get a single element from inventory: curl 'localhost:8080/inventory/{id}' -v --user user:pass
    • the one ring:
      • to give the ring to Frodo: curl -v 'http://localhost:8080/inventory/ring' -XPUT -d '{"name": "One ring", "description": "One ring to rule them all and in darkness bind them" }' -H 'Content-type: application/json' --user user:pass
      • to try to see the ring: curl -v 'localhost:8080/inventory/ring' --user user:pass
      • to see the ring when you're a friend: curl -v 'localhost:8080/inventory/ring?friend=true' --user user:pass
      • to try to get the ring from Frodo: curl -v 'localhost:8080/inventory/ring' -XDELETE --user user:pass
      • to get the ring from Frodo with brute force: curl -v 'localhost:8080/inventory/ring?force=true' -XDELETE --user user:pass

frodo's People

Contributors

kmejka avatar

Stargazers

Nithin Prasad avatar Arkadiusz Nieckarz avatar Michał Jezierski avatar

Watchers

James Cloos 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.