set max-age header

This commit is contained in:
Flo 2016-08-22 22:53:01 +02:00
parent 0190c261e2
commit 3af0cc460c

3
examples/osd/triggerbaord/resources/res-event.c Normal file → Executable file
View file

@ -93,6 +93,9 @@ res_get_handler(void *request, void *response, uint8_t *buffer, uint16_t preferr
}
/* A post_handler that handles subscriptions/observing will be called for periodic resources by the framework. */
// tell client when to schedule re-registration: 1 Hour
REST.set_header_max_age(response, /* uint32_t, Seconds */ 3600);
}
/*
* Additionally, res_event_handler must be implemented for each EVENT_RESOURCE.