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</>
HttpClient20 Mei 2025

How do I use SSL/TLS with Java 11 HttpClient for secure requests?

To use SSL/TLS with Java 11’s HttpClient for secure HTTPS requests, you need to ensure proper configuration of certificates and trust stores. Here’s a detailed step-by-step guide: 1. Default SSL Configuration By default, the Java 11 HttpClient will handle HTTPS requests securely using the system’s default trust store (java.security settings or cacerts trust store in […]

Wayan · 5 menit baca
HTTPCLIENT / CATATAN</>
HttpClient19 Mei 2025

How do I use Java 11 HttpClient with a proxy server?

To use Java 11’s HttpClient with a proxy server, you need to configure the proxy using the ProxySelector class. The ProxySelector allows you to specify a proxy through which HTTP requests should pass. Here’s an example of how you can configure and use HttpClient with a proxy server: Step-by-Step Example Example with Proxy Configuration package […]

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

How do I use Java 11 HttpClient with basic authentication?

Using Java 11’s HttpClient with Basic Authentication is straightforward. Below is an example of how to configure and send an HTTP request using Basic Authentication: Steps: Encode the Username and Password: Basic Authentication requires the credentials (username and password) to be Base64 encoded in the format username:password. Set the Authorization Header: Attach the Base64 encoded […]

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

How do I upload a file using multipart with Java 11 HttpClient?

To upload a file using the modern HttpClient introduced in Java 11, you can use the multipart/form-data request. The steps involve creating a HttpRequest and sending the file as part of the multipart request body. Below is an example implementation: Example Code: File Upload with Multipart package org.kodejava.net.http; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import […]

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

How do I send form data using Java 11 HttpClient?

Sending form data using Java 11 HttpClient is fairly straightforward. The HttpClient can be used to send both POST and GET requests, and form data is generally transmitted in POST requests with the application/x-www-form-urlencoded content type. Here’s how you can send form data using Java 11’s HttpClient: Example: Sending Form Data package org.kodejava.net.http; import java.net.URI; […]

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

How do I follow redirects using Java 11 HttpClient?

Java 11 introduced a new HttpClient API in the java.net.http package, making it much easier and more flexible to handle HTTP requests and responses. By default, the HttpClient does not follow redirects automatically. However, you can configure it to follow redirects if required. Here’s how you can configure the HttpClient to follow redirects: Code Example […]

Wayan · 3 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.