Skip to content

Commit d8db06a

Browse files
authored
Update README.md
1 parent efeee88 commit d8db06a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

web/httpclient/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
*Java HTTP Client* was is used to send request HTTP resources over the network.
1+
*Java HTTP Client* is used to send request HTTP resources over the network.
22
It supports HTTP/1.1 and HTTP/2, both synchronous and asynchronous programming models,
33
handles request and response bodies as reactive-streams, and follows the familiar builder pattern.
44
It was added in Java 11.
55

66

7-
* HttpClient: the main entry point of the API. This is the HTTP client that is used to send requests and receive responses.
8-
It supports sending requests both synchronously and asynchronously by invoking its methods send and sendAsync, respectively.
9-
To create an instance, a Builder is provided. Once created, the instance is immutable.
10-
* HttpRequest: encapsulates an HTTP request, including the target URI, the method (GET, POST, etc), headers and other information.
7+
* HttpClient: It is the main entry point of the API. The client is used to send requests and receive responses.
8+
It supports sending requests both synchronously and asynchronously by calling its methods *send()* and *sendAsync()*,
9+
respectively. A *Builder* is provided to create an instance. Once the client is created, the instance is immutable.
10+
* HttpRequest: It encapsulates an HTTP request, including the target URI, the method (GET, POST, DELETE), headers and other information.
1111
A request is constructed using a builder, is immutable once created, and can be sent multiple times.
12-
* HttpRequest.BodyPublisher: if a request has a body (e.g. in POST requests), this is the entity responsible for publishing
13-
the body content from a given source, e.g. from a string, a file, etc.
14-
* HttpResponse: encapsulates an HTTP response, including headers and a message body, if any. This is what the client
15-
receives after sending an HttpRequest.
16-
* HttpResponse.BodyHandler: a functional interface that accepts some information about the response (status code and headers),
17-
and returns a BodySubscriber, which itself handles consuming the response body.
12+
* HttpRequest.BodyPublisher: If a request has a body (e.g. in POST requests), this is the entity responsible for publishing
13+
the body content from a given source, for instance, from a string or a file.
14+
* HttpResponse: It encapsulates an HTTP response, including headers and a message body, if any. This is what the client
15+
receives after sending an *HttpRequest*.
16+
* HttpResponse.BodyHandler: It is a functional interface that accepts some information about the response (status code and headers),
17+
and returns a *BodySubscriber*, which itself handles consuming the response body.
1818
* HttpResponse.BodySubscriber: subscribes for the response body and consumes its bytes into some other form (a string, a file,
1919
or some other storage type).
2020

0 commit comments

Comments
 (0)