code: public <T> T doAuthenticatedRequest(final StitchAuthRequest stitchReq,
                                        final Decoder<T> resultDecoder) {
      final Response response = doAuthenticatedRequest(stitchReq);
      try {
        final String bodyStr = IoUtils.readAllToString(response.getBody());
        final JsonReader bsonReader = new JsonReader(bodyStr);
  
        // We must check this condition because the decoder will throw trying to decode null
        if (bsonReader.readBsonType() == BsonType.NULL) {
          return null;
        }
        return resultDecoder.decode(bsonReader, DecoderContext.builder().build());
      } catch (final Exception e) {
        throw new StitchRequestException(e, StitchRequestErrorCode.DECODING_ERROR);
      }
    }
docs: Performs a request against Stitch using the provided {@link StitchAuthRequest} object,
  and decodes the response using the provided result decoder.
  
  @param stitchReq The request to perform.
  @return The response to the request, successful or not.