getMethodResponse method
Describes a MethodResponse resource.
May throw UnauthorizedException. May throw NotFoundException. May throw TooManyRequestsException.
Parameter httpMethod
:
Required
The HTTP verb of the Method resource.
Parameter resourceId
:
Required
The Resource identifier for the MethodResponse
resource.
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Parameter statusCode
:
Required
The status code for the MethodResponse resource.
Implementation
Future<MethodResponse> getMethodResponse({
required String httpMethod,
required String resourceId,
required String restApiId,
required String statusCode,
}) async {
ArgumentError.checkNotNull(httpMethod, 'httpMethod');
ArgumentError.checkNotNull(resourceId, 'resourceId');
ArgumentError.checkNotNull(restApiId, 'restApiId');
ArgumentError.checkNotNull(statusCode, 'statusCode');
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/resources/${Uri.encodeComponent(resourceId)}/methods/${Uri.encodeComponent(httpMethod)}/responses/${Uri.encodeComponent(statusCode)}',
exceptionFnMap: _exceptionFns,
);
return MethodResponse.fromJson(response);
}