Max length of webhook response event

In receiving a response from a webhook, I see in the documentation the following example of an event handler function:

void myHandler(const char *event, const char *data) {
// Handle the webhook response

What is the maximum size of the data that can be returned?



I may be wrong but I think the max payload per response is 255 bytes and if the response is more than that it will send the reply in multiple messages.

I have a weather webhook that returns in multiple messages because the reply is more than 255 bytes in total.

1 Like

@sb4, the response will be in 512 byte chunks with as many chunk should as it takes, including the last partial chunk. Your subscription callback needs to handle the multiple chunks if you expect a large response.

1 Like

Is an example available how to split the payload in multiple messages, RWB?
It is possible to check how long the string is and give a message “to long to handle” as example with IF/THEN?

Here are helpful links to test:

@Postler Here is where I learned how to handle split payloads.

Thx! By the way: I like your posts with product suggestions (the wearable display as example).

1 Like

Thx for the great replies. I’ll have to test the multiple chunk paradigm, see how it works for us.