getHIT method
The GetHIT
operation retrieves the details of the specified
HIT.
May throw ServiceFault. May throw RequestError.
Parameter hITId
:
The ID of the HIT to be retrieved.
Implementation
Future<GetHITResponse> getHIT({
required String hITId,
}) async {
ArgumentError.checkNotNull(hITId, 'hITId');
_s.validateStringLength(
'hITId',
hITId,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MTurkRequesterServiceV20170117.GetHIT'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HITId': hITId,
},
);
return GetHITResponse.fromJson(jsonResponse.body);
}