mirror of
https://github.com/espressif/openthread.git
synced 2026-09-05 16:50:05 +00:00
[cli] enhance Cli::Coap and CoapSecure (#6707)
This commit simplifies the handling of request commands (get, post, put, delete, and observe) in `Cli::Coap` and `Cli:CoapSecure` classes. It also updates parsing and processing of arguments for `CoapSecure` request command by removing the optional and actually unused dest IPv6 address argument. Finally, it removes the use of OT core headers/types (mainly the `ot:Coap::Message::BlockType` enumeration) in CLI CoAP modules.
This commit is contained in:
@@ -52,21 +52,21 @@ expect_line "Done"
|
||||
send "coaps connect $addr_1 5684\n"
|
||||
expect_line "Done"
|
||||
expect "coaps connected"
|
||||
send "coaps get $addr_1 test/resource\n"
|
||||
send "coaps get test/resource\n"
|
||||
expect_line "Done"
|
||||
expect "coaps response from $addr_1 with payload: 54657374696e67313233" # ASCII of "Testing123"
|
||||
send "coaps post $addr_1 test/resource con Testing123\n"
|
||||
send "coaps post test/resource con Testing123\n"
|
||||
expect_line "Done"
|
||||
expect "coaps response from $addr_1"
|
||||
send "coaps put $addr_1 test/resource con Testing123\n"
|
||||
send "coaps put test/resource con Testing123\n"
|
||||
expect_line "Done"
|
||||
expect "coaps response from $addr_1"
|
||||
send "coaps delete $addr_1 test/resource con\n"
|
||||
send "coaps delete test/resource con\n"
|
||||
expect_line "Done"
|
||||
expect "coaps response from $addr_1"
|
||||
send "coaps post $addr_1 test/resource none Testing123\n"
|
||||
send "coaps post test/resource none Testing123\n"
|
||||
expect_line "Done"
|
||||
send "coaps get $addr_1 default\n"
|
||||
send "coaps get default\n"
|
||||
expect_line "Done"
|
||||
expect "coaps response from $addr_1"
|
||||
set addr_2 [get_ipaddr mleid]
|
||||
|
||||
Reference in New Issue
Block a user