Jump to: navigation, search

Jetty/Tutorial/HttpClient



Introduction

HttpClient is the Jetty component that allows to make requests and interpret responses to HTTP servers.

This tutorial takes you through the steps necessary to use the HttpClient in the most effective way.

Details

The HttpClient is by its nature asynchronous. This means that the code that sends the request does not wait for the response to arrive before continuing. Instead, the request is sent concurrently to your code, and the response is interpreted also concurrently with your code.

The HttpClient API offers you callbacks to interact with the request-response lifecycle. These callbacks will be called by the HttpClient implementation to allow further actions to be performed during each request-response event.