In computer science, according to Wikipedia, the payload refers to “the part of the transmitted data that is the actual intended message”.
The term is borrowed from the transportation term that refers to the part of the load that pays for the transportation. Here’s an example: a train carries 30 tons of goods; these goods are considered the payload. Of course, the fully loaded train is heavier since there’s the driver, the train itself, and the fuel. However, the goods pay for the “overhead” and are the only thing that the customer cares about, hence why it’s called “payload.”
In programming, the payload differentiates the important data from the overhead that supports its transfer. Let’s look at an example:
{
"status":"OK",
"data":
{
"message":"Hello world"
}
}
In this JSON response, “Hello world” is the payload, and the rest is overhead.
Free Resources