Executes the request, returning the full response body @return Body containing the "data" object and other metadata @throws IOException
()
| 38 | * @throws IOException |
| 39 | */ |
| 40 | public ResultBody<T> executeRaw() throws IOException { |
| 41 | HttpResponse response = this.client.request(this); |
| 42 | |
| 43 | if (this.client.logAsanaChangeWarnings) { |
| 44 | HttpHeaders reqHeaders = new HttpHeaders(); |
| 45 | reqHeaders.putAll(this.client.headers); |
| 46 | handleAsanaChangeHeader(reqHeaders, response.getHeaders()); |
| 47 | } |
| 48 | |
| 49 | return Json.getInstance().fromJson( |
| 50 | new BufferedReader(new InputStreamReader(response.getContent(), StandardCharsets.UTF_8)), |
| 51 | new TypeToken<ResultBody<T>>() { |
| 52 | }.where( |
| 53 | new TypeParameter<T>() { |
| 54 | }, |
| 55 | this.elementClass |
| 56 | ).getType() |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | public ItemRequest<T> query(Map<String, Object> object) { |
| 61 | return (ItemRequest<T>) super.query(object); |