Coder Social home page Coder Social logo

java-seed-webservice's Introduction

Seed project WebService for Java

How to use

git clone https://github.com/johnidm/java-seed-webservice

Open project in your preference IDE and run project.

Tests URI's

Based in URL http://localhost:8080 and URI http://localhost:8080/api/v1

###XML

#####GET

curl -v -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET http://localhost:8080/api/v1/bier

#####GET (specify item)

curl -v -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET http://localhost:8080/api/v1/bier/2

#####DELETE

curl -v -H "Accept: application/xml" -H "Content-Type: application/xml" -X DELETE http://localhost:8080/api/v1/bier/3

#####POST

curl -v -H "Accept: application/xml" -H "Content-Type: application/xml" -X POST http://localhost:8080/api/v1/bier -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><bier><brewery>Way Beer</brewery><id>4</id><name>Way Beer Cream Porter</name><type>ALE</type></bier>'

#####PUT

curl -v -H "Accept: application/xml" -H "Content-Type: application/xml" -X PUT http://localhost:8080/api/v1/bier/3 -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><bier><brewery>Hi-Wire Brewing</brewery><id>3</id><name>Hi-Wire Lager</name><type>ALE</type></bier>'

###JSON

#####GET

curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:8080/api/v1/bier

#####GET (specify item)

curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:8080/api/v1/bier/2

#####DELETE

curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X DELETE http://localhost:8080/api/v1/bier/3

#####POST

curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X POST http://localhost:8080/api/v1/bier/ -d '{ "brewery": "Way Beer",  "id": "4", "name": "Way Beer Cream Porter",  "type": "ALE" }'

#####PUT

curl -v -H "Accept: application/json" -H "Content-Type: application/json" -X PUT http://localhost:8080/api/v1/bier/3 -d '{"brewery":"Hi-Wire Brewing","id":"3","name":"Hi-Wire Lager","type":"ALE"}'

java-seed-webservice's People

Contributors

johnidm avatar

Watchers

 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.