I want to use Java 11 HttpClient and send header first, check response and if response is OK then send the body. How can I send header only? this is my current code: However with such httpResponse I understand I send the body. Answer By default, the header comes first in requests. What you asked is, The first request with