Class StitchRequestClientImpl

    • Constructor Detail

      • StitchRequestClientImpl

        public StitchRequestClientImpl​(String baseUrl,
                                       Transport transport,
                                       Long defaultRequestTimeout)
        Constructs a StitchRequestClientImpl with the provided parameters.
        Parameters:
        baseUrl - the base URL of the Stitch server to which this client will make requests.
        transport - the underlying Transport that this client will use to make requests.
        defaultRequestTimeout - the number of milliseconds the client should wait for a response by default from the server before failing with an error.
    • Method Detail

      • doRequest

        public Response doRequest​(StitchRequest stitchReq)
        Performs a request against global Stitch app server. Throws a Stitch specific exception if the request fails.
        Parameters:
        stitchReq - the request to perform.
        Returns:
        a Response to the request.
      • doStreamRequest

        public EventStream doStreamRequest​(StitchRequest stitchReq)
        Performs a streaming request against global Stitch app server. Throws a Stitch-specific exception if the request fails.
        Parameters:
        stitchReq - the request to perform.
        Returns:
        an EventStream that will provide response events.