Class HttpQueryEvaluator
java.lang.Object
fr.inria.rules.integraal.storage.external.evaluator.HttpQueryEvaluator
- All Implemented Interfaces:
NativeQueryEvaluator<String,String>
Sends an HTTP query.
This evaluator uses java.net's
HttpRequest to send the query.
The result is a String which represents the results according to the queried service
* This will often represent raw HTML or JSON data.-
Constructor Summary
ConstructorsConstructorDescriptionHttpQueryEvaluator(String username, String password) Construct a new evaluator which will used the given credentials -
Method Summary
-
Constructor Details
-
HttpQueryEvaluator
-
-
Method Details
-
evaluate
Description copied from interface:NativeQueryEvaluatorEvaluate the given query and returns the result This should not do anymore work- Specified by:
evaluatein interfaceNativeQueryEvaluator<String,String> - Parameters:
query- to evaluate- Returns:
- an optional which contains the results of the query if everything went right, an empty optional otherwise
-