Class StitchRequestClientImpl
- java.lang.Object
-
- com.mongodb.stitch.core.internal.net.BaseStitchRequestClient
-
- com.mongodb.stitch.core.internal.net.StitchRequestClientImpl
-
- All Implemented Interfaces:
StitchRequestClient
public class StitchRequestClientImpl extends BaseStitchRequestClient
-
-
Constructor Summary
Constructors Constructor Description StitchRequestClientImpl(String baseUrl, Transport transport, Long defaultRequestTimeout)Constructs a StitchRequestClientImpl with the provided parameters.
-
Method Summary
Modifier and Type Method Description ResponsedoRequest(StitchRequest stitchReq)Performs a request against global Stitch app server.EventStreamdoStreamRequest(StitchRequest stitchReq)Performs a streaming request against global Stitch app server.-
Methods inherited from class com.mongodb.stitch.core.internal.net.BaseStitchRequestClient
close
-
-
-
-
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 underlyingTransportthat 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
Responseto 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
EventStreamthat will provide response events.
-
-