19 questions for “Java Networking & HTTP Client”

Found in 1 field. Select a question to see its full answer.

Information Technology

19 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is the modern java.net.http.HttpClient (introduced in Java 11), and how does it improve on the older HttpURLConnection for making HTTP requests? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientBeginner
2What is the java.net.Socket and ServerSocket class pair, and how would you implement a basic TCP client-server communication using them at a lower level than HttpClient? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate
3How would you implement a WebSocket client using java.net.http.WebSocket for real-time, bidirectional communication, and how does its event-driven Listener interface work? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientAdvanced
4How would you configure HttpClient with custom timeouts, a proxy, and connection pooling behavior, and what's the difference between a connection timeout and a request/response timeout? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate
5How would you implement retry logic with exponential backoff for HTTP requests made via HttpClient, given the client doesn't provide built-in retry support natively? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientAdvanced
6How does HttpClient handle automatic following of HTTP redirects (3xx responses), and how would you configure or disable this behavior? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate
7How would you configure HttpClient to trust a custom or self-signed SSL/TLS certificate for testing against an internal service, and what security risks does disabling certificate validation entirely introduce? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientAdvanced
8How would you make an asynchronous, non-blocking HTTP request using HttpClient's sendAsync() method, and how does the returned CompletableFuture integrate with the rest of an asynchronous pipeline? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate
9How would you send a POST request with a JSON request body using HttpClient, and correctly parse a JSON response using a library like Jackson? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate
10How would you send URL-encoded form data (application/x-www-form-urlencoded) using HttpClient, as opposed to a JSON request body? Java › Java Networking & HTTP ClientJavaJava Networking & HTTP ClientIntermediate