HTTP Flashcards
What is a “web service”? What’s the advantage of distributing software as a web service?
A web service is a unit of managed code that can be remotely invoked using HTTP. That is, it can be activated using HTTP requests. Web services allow you to expose the functionality of your existing code over the network. Once it is exposed on the network, other applications can use the functionality of your program.
What’s the difference between REST and SOAP services?
SOAP is a protocol whereas REST is an architectural pattern. SOAP uses service interfaces to expose its functionality to client applications while REST uses Uniform Service locators to access to the components on the hardware device.
What does HTTP stand for?
Hypertext Transfer Protocol
What are the components inside of an HTTP request? What about an HTTP response?
HTTP request is divided into 3 parts:
A request line A set of header fields A body, which is optional
HTTP response is also divided into 3 parts:
Status line Header Body, optional
List the levels of HTTP status codes and what they mean
Informational responses (100–199)
Successful responses (200–299)
Redirection messages (300–399)
Client error responses (400–499)
Server error responses (500–599)
What are some specific HTTP status codes that are commonly used?
404
200
500
What is service-oriented architecture (SOA)?
A philosophy in which all interactions among computing devices are defined as services in a formal, standardized way.
How can you achieve loose coupling with SOA?
SOA accomplishes loose coupling through the use of contracts and bindings. A consumer asks a third-party registry for information about the type of service it wishes to use. The registry returns all the services it has available that match the consumer’s criteria.
What is an Enterprise Service Bus (ESB)?
An Enterprise Service Bus (ESB) is fundamentally an architecture. It is a set of rules and principles for integrating numerous applications together over a bus-like infrastructure.
What are some best practices when creating web services?
Accept and respond with JSON.
Use nouns instead of verbs in endpoint paths.
Name collections with plural nouns.
Nesting resources for hierarchical objects.
Handle errors gracefully and return standard error codes.
Allow filtering, sorting, and pagination.
Maintain Good Security Practices.