getGatewayResponse method
Future<GatewayResponse>
getGatewayResponse({
- required GatewayResponseType responseType,
- required String restApiId,
Gets a GatewayResponse of a specified response type on the given RestApi.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter responseType :
The response type of the associated GatewayResponse.
Parameter restApiId :
The string identifier of the associated RestApi.
Implementation
Future<GatewayResponse> getGatewayResponse({
required GatewayResponseType responseType,
required String restApiId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/gatewayresponses/${Uri.encodeComponent(responseType.value)}',
exceptionFnMap: _exceptionFns,
);
return GatewayResponse.fromJson(response);
}