Comments (5)
Currently I parse UriQuery by myself using :
// TODO remove this class when https://github.com/open-coap/java-coap/issues/45 will be fixed.
public class QueryUtil {
public static Map<String, String> parseUriQuery(String uriQuery) {
if (uriQuery == null || uriQuery.length() == 0) {
return Collections.emptyMap();
}
Map<String, String> result = new LinkedHashMap<>();
String[] params = uriQuery.substring(uriQuery.indexOf('?') + 1).split("&");
for (String prm : params) {
String[] p = prm.split("=", 2);
if (p.length == 2) {
result.put(p[0], p[1]);
} else if (p.length == 1) {
result.put(p[0], null);
} else {
throw new IllegalArgumentException();
}
}
return result;
}
}
for (Entry<String, String> entry : QueryUtil.parseUriQuery(coapRequest.options().getUriQuery())
.entrySet()) {
... ..
}
from java-coap.
Currently empty query value can be placed in such way: field1=value1&field2=&field3=
, so equal sign is needed. Would that work with Leshan?
from java-coap.
Nope that does not match the LWM2M specification 😬
See for Q option :
/rd?ep={Endpoint Client Name}<={Lifetime}&lwm2m={version}&b={binding}&Q&sms={MSISDN}
from java-coap.
There is release v6.12.0 that contains implementation for this ticket, can we close it?
from java-coap.
Tested with v6.12.0, my integrations tests pass now without my "HACK" ✔️
Thx for adding this 🙏
from java-coap.
Related Issues (20)
- General discussion / feedback from Leshan Team HOT 49
- Being able to check if a message (request/response) is a CON ? HOT 4
- Shared 'observe relation' store at CoAP client side. HOT 6
- NPE in Deduplicator HOT 3
- Add a way to configure ACK_RANDOM_FACTOR for retransmission. HOT 3
- We should be able to add `/` and `/*` to `RouterService` HOT 5
- Using Semantic Versioning to manage API changes ? HOT 1
- should `responseTimeout` be mandatory ? HOT 11
- Feedback about new API for CoAP Observe. HOT 34
- RFC9175 Request-Tag and Echo Option HOT 28
- General questions about coap+tcp usage ? HOT 7
- Copy/paste typo in `SingleConnectionSocketServerTransport` ? HOT 2
- Question about cancelling observe with `coap+tcp` ?
- New CoapRequest / CoapResponse Builder API feedback HOT 4
- Notification without observe option HOT 3
- PSK and RPK support using `coap+tcp` HOT 8
- Missing API in Transport Context HOT 1
- Introduce a CoapMessage class/interface ? HOT 4
- Missing peer identity/transport context checks ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-coap.