This article explains the PHP curl_setopt() function, covering its syntax, parameters, return value, and provides a complete example of sending a GET request with cURL, including detailed explanations of each option used.
This article introduces lua-resty-http, a non‑blocking Lua library for OpenResty, outlines its key features, typical use cases, installation steps, and provides both basic and advanced code examples—including configuration, Lua scripts, and caching strategies—to help developers efficiently perform HTTP requests within Nginx.
This tutorial explains how to construct XML data in Python, set the appropriate Content-Type header, send it via a POST request using the requests library, and parse the XML response, providing complete example code for developers working with web APIs.
Understanding the SameSite attribute lets developers control cookie transmission across sites, balancing security and usability by choosing Strict for maximum protection, Lax for a user‑friendly compromise, or None (with Secure) for cross‑site scenarios, with practical code examples and usage guidelines.
This article explains the mechanisms of frontend caching, covering HTTP cache headers such as Expires and Cache‑Control, browser memory and disk caches, negotiation strategies with ETag and Last‑Modified, and practical NestJS examples to improve web performance.
This article explains the evolution of HTTP from 1.1 to HTTP/3, introduces the QUIC protocol and its packet‑based design, and details how QUIC reduces RTT, solves head‑of‑line blocking, improves congestion and flow control, and supports connection migration.
This article explains the fundamentals of the HTTP protocol, illustrates its susceptibility to man‑in‑the‑middle attacks, discusses symmetric and asymmetric encryption attempts, and then details how HTTPS (TLS) and the CA trust model protect data transmission from interception and tampering.
This article demonstrates how to perform GET and POST requests, maintain sessions, handle retries, pass query parameters, validate responses with JSON Schema, upload files, run automated tests, and improve performance with multithreading and streaming downloads using Python's Requests library.
This article explains Go's socket programming workflow, detailing the traditional steps of creating, binding, listening, and communicating over sockets, then shows how net.Dial simplifies connections for TCP, UDP, and ICMP, and demonstrates practical HTTP client usage with code examples.
This article explains the HTTP QUERY method as a safe, idempotent request type that carries payloads like POST but enables caching and automatic retries, detailing its semantics, caching behavior, Accept-Query header, and providing practical code examples.
This article demystifies the confusion between HTTP methods POST, PUT, and PATCH by explaining their distinct purposes, showing practical code examples, and highlighting when each should be used in RESTful API design.
This article explains how the PHP curl_multi_add_handle() function can add multiple cURL handles to a single multi‑handle session, provides its syntax and parameters, and includes a complete example demonstrating initialization, adding handles, executing requests, retrieving responses, and cleaning up.
This article explains why the Spring MVC @RequestBody annotation cannot be applied to multiple parameters in a single handler method, detailing the internal request‑body reading process, the resulting HttpMessageNotReadableException, and how to correctly handle multiple data parts using a single DTO.
This tutorial walks through creating a full‑stack project that uses json-server to expose a RESTful API, demonstrates CRUD operations via Postman, and shows how to interact with the API from a simple frontend using JavaScript fetch calls.
This article explains the HTTP QUERY method—a safe, idempotent request type that carries query payloads in the body, contrasts it with GET and POST, details caching behavior, the Accept-Query header, and provides practical examples of direct and indirect responses.
This article explains the evolution from HTTP/1.1 to HTTP/3, detailing QUIC's UDP‑based design, its impact on connection establishment, migration, head‑of‑line blocking, multiplexing, congestion control, forward error correction, and flow‑control mechanisms for modern web services.
This article introduces the Go library grequests—a clone of Python's requests—demonstrates its installation, compares its API with net/http, and provides concise examples for GET, POST, query strings, basic authentication, and file upload/download, highlighting its simplicity and advantages for HTTP client development.
This article traces the development of the HTTP protocol from its simple single‑line origins in HTTP/0.9 through the extensible HTTP/1.0 and standardized HTTP/1.1 versions, to the performance‑focused HTTP/2 and the QUIC‑based HTTP/3, highlighting key features, limitations, and architectural changes.
This article explains the purpose and classification of HTTP status codes—from informational 1xx to server error 5xx—while also providing an in‑depth walkthrough of the OSI seven‑layer model and its TCP/IP counterpart, detailing each layer’s role, protocols, and typical devices.
This guide explains how to replace slow synchronous HTTP calls with Guzzle's asynchronous requests in PHP, showing code examples, performance measurements, and practical tips for installing and using promises to achieve faster concurrent API calls.
The article introduces the Python mechanize library, explains its capabilities for automating web interactions such as form submission, link navigation, cookie management, and redirects, provides basic usage examples, detailed sample code for various testing scenarios, and notes its limitations compared to Selenium.
This article demonstrates how to apply Monkey Patching in Go using the gomonkey library to unit‑test a simple HTTP service, covering code examples, dependency analysis, patch creation, test execution parameters, and practical considerations such as inlining and concurrency limitations.
This article explains the concept of idempotence, why it matters in distributed systems, how to handle timeout scenarios, design principles using globally unique IDs, and eight practical implementation patterns—including database tricks, token schemes, locking, and HTTP method considerations—to build robust, repeat‑safe APIs.
This article explains the fundamentals of HTTP caching, including how it works, the different cache types, key cache-control directives, and the testing scenarios where testers must be aware of cache behavior to ensure performance, data consistency, and security.
This article explains how to write reliable unit tests for Go HTTP applications by isolating external dependencies, covering server‑side handlers, client‑side monitoring, and using tools such as net/http/httptest, testify, and gock to create test doubles and mock HTTP services.
This article explains how to obtain cookies from an initial HTTP response using Python's requests library, reuse them in subsequent requests, and handle related security considerations such as CSRF tokens and robots.txt compliance, providing a complete code example and step‑by‑step guidance.
Bilibili created a unified front‑end request library using a Koa‑style middleware “onion” architecture—ConfigCtrl, AssembleCtrl, and RequestCtrl—to standardize error handling, cut code redundancy, improve performance, and provide consistent, extensible API calls across SSR/CSR, Vue2/Vue3, and in‑app H5 environments.
The article walks through every step from typing a URL to final page rendering, detailing URL parsing, DNS lookup, TCP three‑way handshake and termination, HTTP request/response structure, congestion and flow control mechanisms, and the browser’s DOM, CSS, layout and painting processes.
This article explains the fundamentals of TCP, why raw TCP communication faces issues like message boundary ambiguity, how HTTP and RPC are built on TCP as application‑layer protocols, and compares their use cases, performance, and evolution to help developers choose the right protocol for their systems.
This article explains Gin's Bind() method, detailing how it detects request content types, selects appropriate binders for JSON, form, and XML data, performs parsing and validation, handles errors, and provides a practical code example for Go web developers.
This guide walks you through installing the wrk load‑testing tool on Unix‑like systems, explains its core command‑line options, shows how to interpret benchmark results, and demonstrates advanced customization using Lua scripts for POST requests, dynamic parameters, authentication, and HTTP pipelining.
This article explains why Spring MVC cannot parse multiple @RequestBody annotations on a single handler method, analyzes the internal I/O stream closure that causes the failure, and provides a practical solution using a request‑body caching wrapper and a servlet filter to allow repeated reads of the request payload.
This article explains TCP basics, why raw TCP communication has boundary issues, how custom protocols like HTTP and RPC are built on TCP, and compares their purposes, performance, and usage scenarios in modern software architecture.
This article explains what ports are, why they are essential for web and other services, how default ports work, the role of ports in inter‑process communication, and how they relate to concepts like naming services and inversion of control.
This guide explains proxy classifications, shows how to configure HTTP, HTTPS, and SOCKS proxies with Linux curl—including authentication options—and provides step‑by‑step examples and test results to evaluate the anonymity level of each proxy type.
This article explains how to use PHP's curl_multi_select() function within the curl_multi library to wait for active cURL transfers, describes its parameters, demonstrates a complete example with multiple handles, and provides best‑practice tips for efficient multi‑request handling.
The article explains the concept of idempotence in computing, illustrates typical duplicate‑request scenarios, and presents three practical backend solutions—unique database indexes, optimistic locking with version control, and a Redis‑based token mechanism—along with their advantages, trade‑offs, and implementation details.
This article explains the purpose, syntax, and usage of the PHP curl_close() function, provides a complete example of initializing, configuring, executing, and closing a cURL request, and outlines the resource‑saving benefits of properly terminating cURL sessions.
This article explains step‑by‑step what occurs when a user types a URL and presses Enter, covering URL parsing, DNS resolution, TCP three‑way handshake and four‑way termination, HTTP request/response formation, and the browser’s rendering process, providing interview‑ready insights into web networking fundamentals.
This article presents ten practical Python examples demonstrating how to create and parse JSON data, perform GET and POST requests, handle parameters, timeouts, cookies, custom headers, file downloads, authentication, and retry mechanisms using the Requests library, enhancing web development and API integration skills.
This article explains the CORS mechanism, the four essential response headers, how preflight requests work, and provides detailed Nginx proxy configurations with multiple real‑world scenarios to eliminate cross‑origin errors when a front‑end site accesses a back‑end service.
This article explains the PHP curl_init() function, covering its syntax, optional URL parameter, return values, and provides a complete example that demonstrates initializing a cURL session, setting options, executing a request, handling errors, closing the session, and processing JSON responses.
Spring Cloud can use either HTTP‑based REST calls, which offer flexible, language‑agnostic JSON communication and simpler implementation, or RPC over TCP, which provides faster, binary‑serialized calls that appear local but require tighter API contracts, so modern microservices usually prefer HTTP for its adaptability and scalability.
This article explores the fundamentals of TCP communication, explains why raw TCP lacks message boundaries, and compares HTTP and RPC protocols—covering their histories, use cases, service discovery, connection handling, serialization, and performance trade‑offs—to answer why both coexist in modern software architectures.
This article explains the classification of HTTP request error codes, details typical 4xx client and 5xx server errors, provides common causes, and offers practical debugging steps and solutions to efficiently identify and resolve front‑end and back‑end issues.
Learn how to conceal your IP using Linux curl by configuring various HTTP and SOCKS proxy types, understanding their anonymity levels, applying appropriate curl parameters—including authentication options—and testing proxy effectiveness with a PHP script that reveals server‑side IP and header information.
This tutorial walks you through installing the Python requests library on Windows and Linux, demonstrates how to perform GET, POST, PUT requests, pass parameters, bypass anti‑scraping measures, and save fetched HTML or images to local files with clear, runnable code examples.
This guide explains the HTTP chunked transfer encoding mechanism, details its format, and provides a complete PHP Workerman server and JavaScript client implementation to stream data chunk‑by‑chunk, including installation steps, code examples, and expected output.
This tutorial walks you through installing libcurl on Ubuntu, writing a simple C program that uses libcurl to perform a GET request, compiling the code with the proper linker flags, and running the executable to display the fetched web page.
The article analyzes why Spring Cloud often prefers HTTP instead of RPC for remote calls, detailing the technical differences, advantages, disadvantages, and selection criteria of each approach, and explains how microservice trends shape this choice.
The article explains why Spring Cloud prefers HTTP over RPC for remote calls, detailing the advantages of embedded Tomcat and JSON over HTTP, the limitations of TCP‑based RPC, and provides a comparative analysis of their architectures, pros, cons, and suitability for microservices.
This guide explains how to create and configure Spring Boot's RestClient, covering instance creation, request building, header and body handling, response retrieval, error processing, the exchange method, and available client request factories for robust synchronous HTTP communication.
This guide walks through diagnosing and fixing typical CORS problems by configuring Nginx as a proxy, explaining the four essential response headers, handling preflight requests, and providing complete server blocks for various error scenarios.
This tutorial explains how to install and start Whistle, configure browser proxy plugins, set up HTTPS certificates, capture mobile traffic, and leverage advanced features such as Weinre console, response/request tampering, CORS handling, JavaScript injection, and domain mapping to improve development efficiency.
This article explains why browsers block cross‑origin requests, details the four CORS response headers, demonstrates common error scenarios, and provides step‑by‑step Nginx configuration examples—including handling pre‑flight OPTIONS requests and header inheritance—to reliably solve CORS problems.
This tutorial demonstrates how to configure a SpringBoot application to repeatedly call a third‑party HTTP API, parse the returned JSON with FastJSON, and process each data item concurrently using a fixed thread pool initialized in a scheduled task.
This article explains why browsers block cross‑origin requests, details the four CORS response headers, demonstrates common error scenarios, and provides a series of Nginx configuration examples—including handling preflight OPTIONS requests, custom headers, and method restrictions—to reliably solve CORS problems during development.
This guide explains how web servers should differentiate between missing authentication information and invalid credentials, detailing when to return 401 Unauthorized or 403 Forbidden, the associated response flows, security best practices, and user‑experience considerations to improve safety and clarity.
The article shows how to fix CORS errors when a front‑end on http://localhost:8080 accesses a back‑end via Nginx by adding proper Access‑Control‑Allow‑* headers for normal and OPTIONS preflight requests, using an always flag correctly, and avoiding common misconfigurations that block cross‑origin calls.
This article reviews common interview questions covering URL request processing, TLS handshake steps, the three‑way TCP handshake and four‑way termination, page‑fault handling, differences between TCP and UDP, HTTP/1.0 vs 1.1, thread‑safety mechanisms in C++, and a hands‑on example of building a thread pool.
This article explains the same‑origin policy, its role in restricting DOM, data, and network access, introduces Cross‑Origin Resource Sharing (CORS) with simple and preflight requests, and outlines how servers should configure headers to safely enable cross‑origin communication.
This article documents a performance benchmark of AngusTester on a single node, demonstrating over 600,000 transactions per second against an Nginx HTTP server, and details the test purpose, environment, configuration, execution steps, and result analysis.
This article explains how Spring Cloud leverages embedded Tomcat to handle HTTP requests for flexible, cross‑platform microservice communication, contrasts it with TCP‑based RPC's handshake and serialization requirements, and outlines the advantages, disadvantages, and future trends of each approach.
This article explains how Spring Cloud leverages HTTP via an embedded Tomcat container for flexible, cross‑platform microservice communication, contrasts it with TCP‑based RPC's serialization requirements, and outlines the advantages, disadvantages, and selection criteria for each approach.
This guide walks through preparing a local frontend and backend, explains the four essential CORS response headers and preflight requests, then presents five common CORS error cases with step‑by‑step Nginx configuration fixes and a complete working example.
This article explains the PHP header() function, covering its syntax, parameter details, and typical scenarios such as page redirection, setting HTTP response headers, status codes, cache control, and file downloads, with clear code examples for each case.
This guide walks through Spring 6’s new capabilities—including Java 17 baseline, Jakarta namespace migration, HTTP interface proxies with @HttpExchange, WebClient integration via JDK HttpClient, internationalized ProblemDetail handling, the RestClient API, and executing asynchronous tasks on virtual threads—all demonstrated with concise code examples.
This article introduces mica-http, a lightweight Fluent‑style HTTP client built on OkHttp, walks through dependency setup, synchronous and asynchronous usage, global logging, custom client and cookie management, presents performance benchmarks, and highlights its automatic resource handling for safe, high‑performance requests.
Spring developers should replace the deprecated RestTemplate with the reactive WebClient, which offers non‑blocking I/O, a fluent functional API, streaming support, richer error handling and configurable timeouts, while still allowing synchronous calls via block(), as demonstrated by practical Spring Boot 3 code examples.
This article explains the same‑origin policy, its role in protecting web applications, how browsers enforce it through DOM, web‑data, and network restrictions, and how Cross‑Origin Resource Sharing (CORS) and preflight requests enable controlled cross‑origin communication while maintaining security.
This article explains the end‑to‑end path that an external HTTP or HTTPS request follows—from the client through DNS resolution, load balancer, ingress controller, service routing, and finally to the target container inside a Kubernetes pod—while also covering optional variations and the underlying network components.
This article compiles common technical interview questions for bank software positions, covering Java fundamentals, MySQL storage engines and indexes, thread‑pool parameters, HTTP GET/POST differences, TCP vs UDP characteristics, session and cookie handling, Redis data types, and C++ memory management, providing concise explanations and examples for each topic.
This guide walks you through installing the lightweight HFS HTTP file server on Ubuntu 22.04, configuring it for both interactive and systemd daemon modes, and exposing a shared directory over the network with step‑by‑step commands and screenshots.
This article introduces the Hutool Java utility library, outlines its core modules, shows how to integrate it via Maven, and provides practical code examples for HTTP requests, random code generation, pinyin conversion, timing, number handling, data masking, email sending, and Bloom filter usage.
The article examines the reasons behind mandating POST for every API endpoint, compares GET and POST characteristics, discusses RESTful principles, highlights practical pros and cons, and offers guidance on choosing the most suitable HTTP method based on business and technical considerations.
This article introduces multiple Java approaches for sending HTTP GET and POST requests, covering the built‑in HttpURLConnection class, Apache HttpClient, Square's OkHttp, and Spring's RestTemplate, with step‑by‑step explanations and complete code examples for each method.
This article explains why browsers cancel pending requests during navigation, the risks of lost data, and demonstrates reliable solutions using JavaScript—first by awaiting fetch, then leveraging the fetch keepalive option—to guarantee logs reach the server without delaying page loads.
This article explains how to use PHP's built‑in network functions, such as file_get_contents() and cURL, to perform remote HTTP GET and POST requests, includes step‑by‑step code examples, and discusses choosing the appropriate method for data transmission in backend development.
This article explains the concepts of APIs and endpoints, clarifies how they relate, highlights their differences, and provides practical examples to help developers correctly design and use API endpoints in web services.
When Tubi upgraded from Node.js 14 to 20, server‑side requests began returning 404 errors, leading to a deep investigation that uncovered how the Request library and Sentry SDK altered HTTP module arguments, causing the built‑in URL detection to misclassify plain objects as URLs.
The article explains how Cloudflare built Pingora, a Rust‑based, cloud‑native reverse proxy that surpasses NGINX in performance, efficiency, and safety by redesigning the worker model, improving connection reuse, and leveraging multithreading and Tokio, while also offering greater extensibility for future services.
This guide introduces Spring WebClient, a reactive, non‑blocking HTTP client for Spring Boot, compares it with RestTemplate, explains configuration options, demonstrates usage patterns, error handling, memory limits, Reactor Netty customization, request bodies, form data, and filter registration, providing practical code examples throughout.
This article explains how to use Lua scripts for performance testing by providing reusable functions that encapsulate HTTP and HTTPS GET/POST requests, support JSON and FormData payloads, and enable file uploads, complete with full code examples.
The investigation revealed that the Go http.Client was not reusing connections because response bodies were closed before being fully read, causing the underlying connections to be marked dead; fully reading the bodies restored pooling, eliminated DNS‑resolution timeouts and dramatically lowered query‑per‑second spikes.
This article explains why Spring's RestTemplate is deprecated in favor of WebClient, highlighting benefits such as non‑blocking I/O, a functional programming style, streaming support, improved error handling, and how to configure timeouts, with full code examples for synchronous and asynchronous requests.
The article explains that HTTP request parameters can be sent as URL‑encoded query strings for GET requests or as various POST body formats—such as application/json, application/x-www-form-urlencoded, multipart/form-data, or text/xml—each requiring the correct Content‑Type header so the backend can parse the data correctly, with JavaScript utilities like FormData, URLSearchParams, or qs helping developers serialize the payload.
This article provides a concise visual guide to eight popular network protocols—including HTTP, HTTP/3, HTTPS, WebSocket, TCP, UDP, SMTP, and FTP—explaining their core functions, typical use cases, and how they enable reliable data exchange across the Internet.
This article demonstrates how Spring Boot’s connectionTimeout setting influences server‑client connections, using three experiments—controller sleep, HttpURLConnection requests, and raw socket communication—to reveal that the timeout only terminates idle client connections, not the duration of request processing.
This article provides a comprehensive analysis of OkHttp’s source code, explaining its request‑execution flow, layered architecture, interceptor chain design, and demonstrates how to implement custom interceptors for unified request handling in Java and Android projects.
This article explains why RestTemplate is deprecated in Spring 5+, introduces the reactive WebClient as its replacement, outlines its advantages such as non‑blocking I/O and functional style, and provides detailed code examples for creating a client, performing synchronous and asynchronous requests, handling errors, and configuring timeouts.
This guide introduces five essential Linux command-line HTTP clients—cURL, HTTPie, Wget, HTTPie-go, and Wuzz—explaining their key features and providing ready-to-use command examples for GET, POST, file downloads, and interactive requests.
This article explains the OSI seven‑layer network model, compares RPC and HTTP services, describes RPC architecture, synchronous and asynchronous calls, and reviews popular RPC frameworks such as gRPC, Thrift, and Dubbo, helping developers choose the right approach for enterprise back‑end systems.
This article explains the fundamentals of the Same‑Origin Policy, its security implications, and how Cross‑Origin Resource Sharing (CORS) works—including simple requests, preflight requests, and handling credentials—to help developers safely perform cross‑domain HTTP operations in browsers.
This article explains the fundamental differences between RPC and HTTP, covering their historical origins, design principles, serialization formats, protocol layers, network communication mechanisms, and appropriate usage scenarios in micro‑service architectures.
This article explains the key differences and performance trade‑offs among HTTP/1.1, HTTP/2, and HTTP/3, detailing keep‑alive, pipelining, streams, multiplexing, QUIC’s 0‑RTT handshake, connection migration, congestion and flow control, and provides practical guidance on when to adopt each protocol.
This guide explains how to use Spring 6.1's new RestClient for synchronous HTTP calls, covering setup, request building, response handling, data conversion, error processing, and advanced exchange methods with full code examples.
An in‑depth guide walks through TCP basics, why raw TCP lacks message boundaries, how HTTP and RPC build on TCP, and compares their service discovery, connection handling, and serialization, revealing why both protocols coexist in modern client‑server architectures.