-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No easy way to set options in client requests #89
Comments
Which option do you want to set ? Coap has many options, each of them has its own special role. I think generic set function won't be very useful. I would like to implement a specific function if you have a common scenario. |
The ones I'm interested in are the Accept and Content-Format options. |
If the CoAPClient interface is getting too complex, a request builder may be something to explore. |
I'm down to rework part of the client and expose a low-level If you're willing to be a little bit patient I can do the change after the DTLS support PR. |
Right now it's a nice to have. I couldn't find a CLI CoAP client, so I wrote my own. When I was contemplating the features it should include, one of the main ones that occurred to me was content-type support. However, I don't need content-type support for my own purposes yet. |
Closed. Reopen it if you have any new problem about it. |
Thanks, I was able to rework my CLI tool to use the latest git version of For those who may be interested: Instead of going the full builder route, I implemented a helper extension trait to make it easier to set some options on a request: https://bitbucket.org/gordon_tyler/workspace/snippets/XEB45a |
Although, a similar situation has cropped up with |
Using
CoAPClient
, there is no way to set options in a request. It's possible to do so by constructing aCoapRequest
manually, but to do so requires re-implementing a bunch of functionality already present inCoAPClient
(gen_message_id
,request_path_with_timeout
andparse_coap_url
in particular).The text was updated successfully, but these errors were encountered: