A Guide to Avoiding Pitfalls with Content-Length in HTTP Requests

A Guide to Avoiding Pitfalls with Content-Length in HTTP Requests

Scenario Recreation: A Frustrating JSON Parsing Issue Recently, during a project integration process, our team encountered a bizarre JSON parsing issue. Here’s what happened: The frontend team copied a normal cURL request from Chrome Developer Tools: curl -X POST https://api.ourcompany.com/v1/orders \ -H "Content-Type: application/json" \ -H "Content-Length: 187" \ -d '{"order_id":"123456","products":[{"sku":"A001","qty":2}],"remark":"Weekend Delivery"}' This request worked … Read more

The Art of Writing HTTP Requests with curl

The Art of Writing HTTP Requests with curl

Introduction curl is a powerful command-line tool for network transfer operations over protocols like HTTP, supporting scripted HTTP requests and providing a rich set of options for users to customize requests and handle responses. Today’s article in the Frontend Morning Reading Course is shared by @Daniel Stenberg and translated by @Piao Piao. The translation starts … Read more

Mastering PHP HTTP GET Requests and Header Information for Easy Data Transmission and Status Control

Mastering PHP HTTP GET Requests and Header Information for Easy Data Transmission and Status Control

Introduction HTTP GET requests are one of the most common request methods in web development, used to send data to the server to retrieve resources. Meanwhile, header information plays a crucial role in HTTP requests, helping us control the state and format of data transmission. This article will detail how to send HTTP GET requests … Read more

Comprehensive Interpretation of the C Language Code Standards by the curl Team

Comprehensive Interpretation of the C Language Code Standards by the curl Team

Consistent code style aids in team collaboration and code reviews. The most commonly used style in the industry is Google’s, but in this section, we will explore something different: the coding standards of the curl team, a tool that we frequently use. To briefly introduce curl, it is very useful for transferring data in command … Read more

Introduction to PHP Function – curl_multi_getcontent(): Retrieve Content from a cURL Session

Introduction to PHP Function - curl_multi_getcontent(): Retrieve Content from a cURL Session

In PHP development, we often need to request data from other servers over the network. cURL (Client URL) is a powerful PHP extension library used for network communication in PHP. cURL provides a series of functions, one of which is curl_multi_getcontent(), which is used to retrieve the content of a cURL session. The curl_multi_getcontent() function … Read more

How PHP Handles Parallel Asynchronous HTTP Requests

How PHP Handles Parallel Asynchronous HTTP Requests

Business cooperation WeChat: 2230304070 Learning and communication:PHP Technical Communication WeChat Group 2025 JetBrains universal activation code & account supports the latest version https://www.mano100.cn/thread-1942-1-1.html In PHP, due to its traditional synchronous blocking model, implementing parallel asynchronous handling of HTTP requests is not as straightforward as in other languages (such as Go or Node.js). However, it is … Read more

HTTP Chunked Transfer Encoding

HTTP Chunked Transfer Encoding

Introduction In HTTP, uploading and downloading files is always a time-consuming process, especially with large files. This led to the development of such data transfer methods after HTTP/1.1. Chunked transfer encoding divides a large file into different chunks for transmission, allowing the client to reassemble the complete data upon receipt. Chunked Transfer Encoding Originally, there … Read more

Testing Methods for HTTP/3 Access

Testing Methods for HTTP/3 Access

As HTTP/3 and QUIC are gradually becoming more popular, how can you test whether your website supports the HTTP/3 protocol? Assuming your custom domain is: mycustom.com1. You can test HTTP/3 support using curl: curl –http3 -kv https://mycustom.com 2. You can also test HTTP/3 access using a mobile browser. In practical tests, it was found that … Read more

What Happens from Inputting a URL to Page Load Completion?

What Happens from Inputting a URL to Page Load Completion?

Background This article is derived from a previous Weibo post I made: However, the purpose of writing this article is not to help everyone prepare for interviews, but to use this question to introduce basic knowledge of computers and the internet, allowing readers to understand how they are interconnected. For ease of understanding, I will … Read more

Key Summary of URL and HTTP Protocols

Key Summary of URL and HTTP Protocols

URL: is a type of URI that identifies an Internet resource and specifies how to operate on or retrieve that resource. It can be identified either through the description of the primary access method or through its “location” on the network. Most URLs follow a standard format that consists of three parts: First part: scheme, … Read more