convertToPb(request).toByteArray(), createApiConfig(fetchOptions));
return new FutureWrapper<byte[], HTTPResponse>(response) {
@Override
protected HTTPResponse wrap(byte[] responseBytes) throws IOException {
URLFetchResponse responseProto =
URLFetchResponse.newBuilder().mergeFrom(responseBytes).build();
if (!fetchOptions.getAllowTruncate() && responseProto.getContentWasTruncated()) {
throw new ResponseTooLargeException(url.toString());
}
return convertFromPb(responseProto);
}