Creating a Frameworkless HTTP Server in Java Packaged as a JAR for Docker Placeholder

Java Code import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpExchange; import java.io.IOException; import java.io.OutputStream; import java.io.InputStreamReader; import java.io.BufferedReader; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.Map; import java.util.stream.Collectors; public class SimpleHttpServer { public static void main(String[] args) throws IOException { HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0); server.createContext("/", new EchoHandler()); server.setExecutor(null); server.start(); System.out.println("Server started on port 8080"); } static class … Read more

The Dance of Improvisation: The Unity of Body Awareness in Creation, Performance, and Appreciation

20250401-20250514 Dance Notes, #15 Today (0401) morning: Self-measurement through the body’s usual perceptions, sliding into the dormant or unconscious places. Continuously expanding the amplitude and subtlety in different dimensions of perception through practice, unfolding self-awareness in a stable and light consciousness. Relaxed yet firm. Determined yet light. Emotionally driven, rationally driven, etc. Refining perception is … Read more

Goodbye SSE, Embrace Streamable HTTP

With the rapid development of artificial intelligence (<span>AI</span>), efficient communication between AI assistants and applications has become particularly important. The Model Context Protocol (<span>MCP</span>, abbreviated as <span>MCP</span>) has emerged to provide a standardized interface for large language models (<span>LLMs</span>) to interact with external data sources and tools. Among the many features of <span>MCP</span>, the <span>Streamable … Read more

Resolving Timeout and Disconnection Issues When Calling Third-Party HTTP APIs in .NET

In .NET development, calling third-party HTTP APIs is a common task. However, in practical applications, we often encounter issues such as request timeouts or connection disconnections. These problems can arise from various reasons, such as network latency, slow server responses, or unreasonable client timeout settings. This article will delve into the causes of these issues … Read more

The Pitfalls of Login Functionality: How an HTTP Redirection Attack Almost Cost My Company (with Solutions)

Follow our public account for Java insightsTimely delivery Last week, I made a blunder at the company—my own login module almost became an accomplice to a phishing site. Today, I want to share this thrilling process and how to avoid the “invisible bomb” of HTTP redirection attacks. The Morning That Drove the Tester Crazy It … Read more

Differences Between WebSocket and HTTP Communication, Usage Scenarios, and WebSocket Code Examples

🕵️ Reading | Changsha ⭐ Software Engineering ⭐ Bachelor’s Degree 🏠 Work | Guangzhou ⭐ Java Full Stack Developer 🌳 Multiple technical forum expert bloggers, over 110,000 fans online ✈️ Official Account | Country Boy Programming. Reply with Java full video tutorial or front-end full video tutorial to get 300G+ tutorial materials and project practical … Read more

HTTP Status Codes: A Comprehensive Analysis of the ‘Morse Code’ Sent by the Server

Introduction 【Preface】 Long time no see! I have been busy with the launch of a new project for the past six months, and I haven’t written an article in a while (please be gentle 😅). During this time, while troubleshooting online issues, I found that many colleagues still understand HTTP status codes as just “200=Success, … Read more

Httpx: The Rising Star of Asynchronous HTTP!

▲ Click the card above to follow me Httpx: The Rising Star of Asynchronous HTTP! In today’s era of high concurrency and high-performance web applications, traditional synchronous HTTP requests are increasingly unable to meet our needs. As a brilliant new star in the Python ecosystem, Httpx is quietly changing the way we handle web requests. … Read more

Httpx: The Future Star of Asynchronous HTTP!

▼ Click the card below to follow me ▲ Click the card above to follow me Httpx: The King of Asynchronous HTTP Libraries! In modern web development, asynchronous programming is becoming the key to enhancing performance. Traditional synchronous HTTP requests are like waiting in line to buy breakfast, where everyone has to wait patiently. Httpx … Read more