How to automate login a website – Java example
In this example, we will show you how to login a website via standard Java HttpsURLConnection. This technique should be working in most of the login form. Tools & Java…
Favourite tutorials for developers
Core Java is the fundamental form of Java. We use it in all Java platforms and technologies. Without going through core Java, it is impossible to advance to advanced Java. Unlike core Java, advanced Java is a specialization of the core Java in some particular domain, such as database handling, networking, and the web.
In this example, we will show you how to login a website via standard Java HttpsURLConnection. This technique should be working in most of the login form. Tools & Java…
Here’s a simple Java HTTPS client to demonstrate the use of HttpsURLConnection class to send a HTTP GET request yo get the https URL content and certificate detail.
This article shows you how to use the new Java 11 HttpClient APIs to send HTTP GET/POST requests, and some frequent used examples.
This article shows you how to use the OkHttp library to send an HTTP GET/POST requests and some frequent used examples.
In this article, we will show you a few examples to make HTTP GET/POST requests via the following APIs: Apache HttpClient 4.5.13, OkHttp 4.2.2, Java 11 HttpClient, Java 1.1 HttpURLConnection…
This article shows you how to use Apache HttpClient to send an HTTP GET/POST requests, JSON, timeout, redirection and some frequent used examples. This article shows you how to use…
The BufferedReader reads characters; while the InputStream is a stream of bytes. The BufferedReader can’t read the InputStream directly; So, we need to use an adapter like InputStreamReader to convert…
This article shows four ways to copy a file in Java: (1) Files.copy (NIO), (2) Apache Commons IO, (3) Guava, (4) Plain Java. In Java 7+, the NIO Files.copy is…
In Java, we can use Files.readAttributes() to get the file metadata or attribute, and then lastModifiedTime() to display the last modified date of a file. For legacy IO, we can…
In Java, we can use String.contains() to check if a String contains a substring. We can also check the substring by using indexOf().