Synchronous communication
Communication methods can be separated into two main categories, as synchronous and asynchronous communication. In synchronous communication, the client sends a request and waits for a reply. Examples of this type of communication method are HTTP, WebSocket, and GRPC protocols. Asynchronous communication, on the other hand, does not wait for a response. In this section, we will discuss different types of synchronous communication methods supported by the Ballerina language with sample code.
Handling HTML form data
Hypertext Transfer Protocol (HTTP) is the most common and simple synchronous method that is widely used to communicate with other services. We have already discussed how to create a simple HTTP server and how to invoke it in the previous chapter. In this section, we will discuss more practical aspects of HTTP.
When you are building web applications, HTML forms are a common way of collecting information from the end user. This information...