← Back to the chapter · Next detail →
Technical detail · CoAP Lab: Stack and Trace Contracts
What the aiocoap base server implements
The server uses a registered TemperatureResource. Its render_get method encodes the fixed reading as bytes. Its render_put method logs the request payload and returns Code.CHANGED. A comment about applying configuration is not an implementation of that behavior.
Content-Format identifies how to interpret payload bytes. The temperature response sets 0 for text; the extended configuration response uses 50 for JSON, a structured text data format. The base server supplies no /config, /readings, discovery handler for listing resources, or changing Observe resource for sending updates after registration.
Startup prints announce a server; a client exchange supplies different evidence. The source uses the library’s default bind rather than an explicitly loopback-only listener restricted to the same host. No tested aiocoap version or fresh execution receipt is established by the supplied server example.