mirror of
https://github.com/deavmi/doap
synced 2024-07-04 14:50:54 +02:00
README
- Added example usage - Added link documentation
This commit is contained in:
parent
8dfab918d9
commit
c1be1b39cf
18
README.md
18
README.md
|
@ -9,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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user