-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[cli] Add support for CoAP URI queries in CLI requests #10003
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Size Report of OpenThread
|
Any further steps required from my side? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Thanks @feherdave.
Some suggestions below:
Edit: Also may need to check the CLA -> #10003 (comment) (please ignore this - I see it is good).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thank you. 👍
…into cli-uriquery
New feature:
Added CoAP URI query processing functionality to CLI.
Solution:
URI string is checked for a '?' character. If found, the URI query related part is moved to another string. Afterwards, the modified
coapUri
string will contain only the path-related parts, and a second string (coapUriQuery
) will hold only the URI query related parts. ThencoapUri
is passed to the originalotCoapMessageAppendUriPathOptions()
method andcoapUriQuery
is passed to a new method calledotCoapMessageAppendUriQueryOptions()
, which - similarly to the other - splits the URI query part into more, smaller pieces by the delimiter '&' and adds them as separate options to the CoAP message making the request generated by this CLI function RFC compliant.If '?' is not found, everything is processed the old way.