While browsing some web service docs, I came across the word "payload", "xml payload" ...
From wikipedia: "*Payload in computing (sometimes referred to as the actual or body data) is the cargo of a data transmission. *"
Does not make much sense here. Can anyone explain what payload / xml payload mean? Thanks.
The "payload" is the actual contents, as opposed to the wrapper, which is the boilerplate XML around (meta-data, document type and such). As such, it is the variable part of the reply.
Both evaluate an XPath expression against the xml payload of the message, supported payload types by default are Node , Document and String .
The REST API Client Service currently accepts only JSON input when making REST API Create, Read, Update, or Delete requests. It is nevertheless possible to use XML input when making REST API requests.
If you want to send XML data to the server, set the Request Header correctly to be read by the sever as XML. xmlhttp. setRequestHeader('Content-Type', 'text/xml'); Use the send() method to send the request, along with any XML data.
The "payload" is the actual contents, as opposed to the wrapper, which is the boilerplate XML around (meta-data, document type and such). As such, it is the variable part of the reply.
The wikipedia definition makes perfect sense to me, as the "non payload" XML in these examples is completely uninteresting. The XML outside is the wrapping, and the payload are the contents ("cargo").
Note that "escaped payload" indicates that the contents are actually some other format, which may be XML escaped. It could be binary data, often escaped as CDATA or Base64, for example. There could be a JPEG image there, for example (if it is correctly escaped). Or HTML, encoded with XML entities. Then the payload would for example be:
<div>example</div>
Which is a simple example for XML-escaped-HTML payload, when there is no reason for the message XML parser to parse the (XML-like) payload.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With