Closed YelloooBlue closed 5 months ago
When using this library, I have the same problem #37 I tried to make a few small modifications and it worked fine.
Before I added query support, queries were parsed as part of URI_PATH
coap.put(IPAddress(10, 0, 1, 1), 5683,"room/lights?n=bed&s=on","hello");
the Option will be resolved as
Option_URI_PATH : room Option_URI_PATH : lights?n=bed&s=on
Based on the position of '/','?' and '&' characters, the path and query are separated
Option_URI_PATH : room Option_URI_PATH : lights Option_URI_QUERY : n=bed Option_URI_QUERY : s=on
It supports the following cases:
URI_PATH
URI_QUERY
The original functions are not affected. Thanks.
@YelloooBlue Thank you for your PR. I will test now.
When using this library, I have the same problem #37 I tried to make a few small modifications and it worked fine.
Before I added query support, queries were parsed as part of URI_PATH
the Option will be resolved as
Based on the position of '/','?' and '&' characters, the path and query are separated
It supports the following cases:
URI_PATH
parameter (root path)URI_QUERY
parameterURI_PATH
withoutURI_QUERY
.The original functions are not affected. Thanks.