Using CURL to test HTTP Requests

$ curl -i -X POST -H “Content-Type:application/json”-d ‘{ “firstName” : “Frodo”, “lastName” : “Baggins” }’ http://localhost:8080/people HTTP/1.1201CreatedServer:Apache-Coyote/1.1Location: http://localhost:8080/people/1Content-Length:0Date:Wed,26Feb201620:26:55 GMT -i ensures you can see the response message including the headers. The URI of the newly created Person is shown -X POST signals this a POST used to create a new entry -H “Content-Type:application/json” sets the…

SOAP vs REST

SOAP (Simple Object Access Protocol) and REST (Representation State Transfer) can’t be compared directly, since the first is a protocol (or at least tries to be) and the second is an architectural style. This is probably one of the sources of confusion around it, since people tend to call REST any HTTP API that isn’t…