public class RestValueService extends Object
| Modifier and Type | Method and Description |
|---|---|
static ResultContainer<Collection<String>> |
get(String restEndpoint,
com.cloudbees.plugins.credentials.common.StandardCredentials credentials,
MimeType mimeType,
String expression,
String filter)
Returns a
ResultContainer capsuling a optional String error message and a collection of parsed string values. |
public static ResultContainer<Collection<String>> get(String restEndpoint, com.cloudbees.plugins.credentials.common.StandardCredentials credentials, MimeType mimeType, String expression, String filter)
ResultContainer capsuling a optional String error message and a collection of parsed string values.
This method uses its parameters to query a REST/Web endpoint to receive a MimeType response, which then
gets parsed with a supported Path expression to extract a collection of string values.
restEndpoint - A http/https web address to the REST/Web endpointcredentials - The credentials required to access said endpointmimeType - The MIME type of the expected REST/Web responseexpression - The Json-Path or xPath expression to filter the valuesfilter - additional regex filter on any parsed valuesResultContainer that capsules either the desired values or a user friendly error message.Copyright © 2016–2020. All rights reserved.