Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
Description
ResourceServiceBroker broker = CrispHstServices.getDefaultResourceServiceBroker();
ExchangeHint headers = ExchangeHintBuilder.create()
.methodName("GET")
.requestHeader("email", "test-email@gmail.com")
.requestHeader("password", "04ba23a976b4da6ae873c9830f73aace6c3162cb")
.build();Resource loginHash = broker.findResources("crisp-resource", "path", headers);
Is there a workaround to do it or can it be fixed?
We can use #resolveBinary(...) [1] instead and parse the Binary output to JSON.
But it would be nice if we have #resolveBinaryAsResource(...) which returns a Resource object instead of Binary. And it makes sense because the underlying ResourceResolver knows how to convert the json or xml data to Resource already.
See the related discussion in the community forum here:
[1] https://documentation.bloomreach.com/library/concepts/crisp-api/getting-started.html