use of com.jcabi.http.response.RestResponse in project jcabi-github by jcabi.
the class RtGitignores method iterate.
@Override
public Iterable<String> iterate() throws IOException {
final RestResponse response = this.request.fetch().as(RestResponse.class).assertStatus(HttpURLConnection.HTTP_OK);
final List<JsonString> list = response.as(JsonResponse.class).json().readArray().getValuesAs(JsonString.class);
final List<String> templates = new ArrayList<String>(list.size());
for (final JsonString value : list) {
templates.add(value.getString());
}
return templates;
}
Aggregations