doap/README.md

36 lines
809 B
Markdown
Raw Normal View History

![](branding/logo.png)
2023-09-12 18:40:43 +02:00
doap
====
2023-09-12 18:43:55 +02:00
[![D](https://github.com/deavmi/doap/actions/workflows/d.yml/badge.svg?branch=master)](https://github.com/deavmi/doap/actions/workflows/d.yml)
2023-09-12 18:40:43 +02:00
**doap** is a CoAP library for the D programming language.
2023-09-12 18:41:11 +02:00
## Usage
Documentation is available [here](https://doap.dpldocs.info/).
### Making a request
2023-09-12 18:41:11 +02:00
```
CoapClient client = new CoapClient("coap.me", 5683);
CoapRequestFuture future = client.newRequestBuilder()
.payload(cast(ubyte[])"Hello this is Tristan!")
.token([69])
.post();
writeln("Future start");
CoapPacket response = future.get();
writeln("Future done");
writeln("Got response: ", response);
client.close();
2023-09-12 18:41:11 +02:00
```
2023-09-12 18:40:43 +02:00
## License
2023-09-12 18:43:55 +02:00
This project is licensed under the [LGPL v3.0](LICENSE).