updateExpirationForHIT method
The UpdateExpirationForHIT operation allows you update the
expiration time of a HIT. If you update it to a time in the past, the HIT
will be immediately expired.
May throw RequestError.
May throw ServiceFault.
Parameter expireAt :
The date and time at which you want the HIT to expire
Parameter hITId :
The HIT to update.
Implementation
Future<void> updateExpirationForHIT({
required DateTime expireAt,
required String hITId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MTurkRequesterServiceV20170117.UpdateExpirationForHIT'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ExpireAt': unixTimestampToJson(expireAt),
'HITId': hITId,
},
);
}