toPostRequestInformation method
RequestInformation
toPostRequestInformation(
- 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
RequestInformation toPostRequestInformation(MultipartBody body,
[void Function(RequestConfiguration<DefaultQueryParameters>)?
requestConfiguration]) {
var requestInfo = RequestInformation(
httpMethod: HttpMethod.post,
urlTemplate: urlTemplate,
pathParameters: pathParameters);
requestInfo.configure<DefaultQueryParameters>(
requestConfiguration, () => DefaultQueryParameters());
requestInfo.headers.put('Accept', 'application/json');
requestInfo.setContentFromParsable(
requestAdapter, 'multipart/form-data', body);
return requestInfo;
}