Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

HTTPCLIENT / CATATAN</>
HttpClient17 Mei 2025

How do I use HttpResponse.BodyHandlers to read responses?

To read HTTP responses in Java 11 using HttpResponse.BodyHandlers, you use the Java 11 java.net.http package, which introduced the HttpClient API. The HttpResponse.BodyHandlers class provides various static methods to handle the HTTP response body in different formats, such as strings, files, or byte arrays. Here’s a step-by-step guide to using HttpResponse.BodyHandlers with examples: Step 1: […]

Wayan · 4 menit baca
HTTPCLIENT / CATATAN</>
HttpClient16 Mei 2025

How do I use HttpRequest.BodyPublishers in Java effectively?

Java 11 introduced the java.net.http package, providing a modern API to work with HTTP. The HttpRequest.BodyPublishers class is part of this package and is used for sending request bodies when creating HTTP requests using HttpClient. Here’s a breakdown of how to use HttpRequest.BodyPublishers effectively in Java 11: 1. Overview of HttpRequest.BodyPublishers HttpRequest.BodyPublishers is a utility […]

Wayan · 4 menit baca
HTTPCLIENT / CATATAN</>
HttpClient16 Mei 2025

How do I build an HttpRequest with query parameters?

In Java 11, you can use the HttpRequest class (from the java.net.http package) to build HTTP requests, including adding query parameters to a URI. Here’s how you can build an HttpRequest with query parameters: Example package org.kodejava.net.http; import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpHeaders; import java.net.URLEncoder; import jav...

Wayan · 3 menit baca
HTTPCLIENT / CATATAN</>
HttpClient15 Mei 2025

How do I use HttpClient to call REST APIs?

Java 11 introduced a new HttpClient API (java.net.HttpClient) that simplifies making HTTP requests and handling responses. It provides a clean and concise way to perform synchronous and asynchronous HTTP operations, and it fully supports RESTful APIs. Here’s a step-by-step guide with examples for how to use the Java 11 HttpClient to call REST APIs. 1. […]

Wayan · 4 menit baca
HTTPCLIENT / CATATAN</>
HttpClient15 Mei 2025

How do I send requests using different HTTP Methods with HttpClient?

Java 11 introduced the HttpClient API to simplify and modernize HTTP communications. This API supports sending requests using different HTTP methods (GET, POST, PUT, DELETE, etc.). Below is an explanation and example of how to perform these operations. 1. Setup You will use the HttpClient and related classes from java.net.http package: HttpClient – To execute […]

Wayan · 4 menit baca
CONCURRENCY / CATATAN</>
Concurrency14 Mei 2025

How do I write custom synchronizers using AbstractQueuedSynchronizer?

Writing custom synchronizers with AbstractQueuedSynchronizer (AQS) in Java involves creating classes that encapsulate synchronization logic, such as locks, semaphores, or barriers. AQS simplifies the development of concurrency tools by handling queueing and thread state management. Below are the key steps and guidelines to write custom synchronizers using AbstractQueuedSynchronizer: 1. Understand AQS Concepts state: AQS maintains […]

Wayan · 4 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.