# otCoapResource Struct Reference

# otCoapResource


`#include <openthread/coap.h>`

Represents a CoAP resource.

## Summary

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-coap-resource#structot_coap_resource_1a114b3fadfe153054e3f35f3d59239a9f` | `void *` Application-specific context. |
| `https://openthread.io/reference/struct/ot-coap-resource#structot_coap_resource_1aa949be7707e04497096a5d81672104ab` | `https://openthread.io/reference/group/api-coap#group__api-coap_1ga43485a1c168a672b36d35f4c6259dbea` The callback for handling a received request. |
| `https://openthread.io/reference/struct/ot-coap-resource#structot_coap_resource_1af0a28ccbe2537f08d338e5e4bef9bdd1` | `struct https://openthread.io/reference/struct/ot-coap-resource *` The next CoAP resource in the list. |
| `https://openthread.io/reference/struct/ot-coap-resource#structot_coap_resource_1af940998e65704f1ddd5a7a61ae08276f` | `const char *` The URI Path string. |

## Public attributes

### mContext

```
void * otCoapResource::mContext
```
Application-specific context.

### mHandler

```
otCoapRequestHandler otCoapResource::mHandler
```
The callback for handling a received request.

### mNext

```
struct otCoapResource * otCoapResource::mNext
```
The next CoAP resource in the list.

### mUriPath

```
const char * otCoapResource::mUriPath
```
The URI Path string.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).