mirror of
https://github.com/deavmi/doap
synced 2024-07-07 05:50:07 +02:00
Merge branch 'master' into feature/cancellable_future
This commit is contained in:
commit
bf834a92c8
20
README.md
20
README.md
|
@ -1,3 +1,5 @@
|
||||||
|
![](branding/logo.png)
|
||||||
|
|
||||||
doap
|
doap
|
||||||
====
|
====
|
||||||
|
|
||||||
|
@ -7,9 +9,25 @@ doap
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
TODO: Add docs
|
Documentation is available [here](https://doap.dpldocs.info/).
|
||||||
|
|
||||||
|
### Making a request
|
||||||
|
|
||||||
```
|
```
|
||||||
|
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();
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
BIN
branding/logo.png
Normal file
BIN
branding/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
BIN
branding/logo.xcf
Normal file
BIN
branding/logo.xcf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user