postAsync method
Future<File?>
postAsync(
- MultipartBody body, [
- void requestConfiguration(
- RequestConfiguration<
DefaultQueryParameters>
- RequestConfiguration<
To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
All of Stripe’s officially supported Client libraries support sending multipart/form-data.
Implementation
Future<File?> postAsync(MultipartBody body,
[void Function(RequestConfiguration<DefaultQueryParameters>)?
requestConfiguration]) async {
var requestInfo = toPostRequestInformation(body, requestConfiguration);
final errorMapping = <String, ParsableFactory<Parsable>>{
'XXX': Error.createFromDiscriminatorValue,
};
return await requestAdapter.send<File>(
requestInfo, File.createFromDiscriminatorValue, errorMapping);
}