Enable Logging for Java 11 HttpClient

Introduction Java’s java.net.http.HttpClient (introduced in Java 11) provides a modern and standardized way to perform HTTP requests. Enabling detailed logging for this client offers invaluable insights when troubleshooting network issues, analyzing request/response behavior, and optimizing application performance. To enable the log, add this JVM option -Djdk.httpclient.HttpClient.log=errors,requests when staring your application. Code example I use this library as a client to call OpenAI API, the library uses httpclient for making http request.
One minute to read

Python Datatype - Strings

Strings: The Textual Heart of Python In Python, strings are sequences of characters used to represent text. You can think of them as an ordered collection of letters, numbers, symbols, and spaces. To define a string, you enclose your text within: Single quotes, double quotes Python is flexible with strings. You can enclose them in eithers in single quotes ’ or double quotes ". s1 = 'Hello world' # Single quotes s2 = "Hello world" # Double quotes The key is to be consistent, but there are times you’ll want to include one type of quote within a string enclosed by the other type.
2 minutes to read