postCodeAsk method
Is askGet with the question in the request BODY, for a question too long or too awkward to put in a URL.
Is askGet with the question in the request BODY, for a question too long or too awkward to put in a URL. query and repo in the body take precedence over ?q= and ?repo=; either source works alone.
Parameters:
- AskPostIn askPostIn (required):
Implementation
Future<AskAnswer?> postCodeAsk(AskPostIn askPostIn,) async {
final response = await postCodeAskWithHttpInfo(askPostIn,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AskAnswer',) as AskAnswer;
}
return null;
}