File tree 3 files changed +6
-11
lines changed
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -202,9 +202,9 @@ impl Meta {
202
202
use std:: convert:: TryInto ;
203
203
let mut form = reqwest:: multipart:: Form :: new ( ) ;
204
204
let mut json_part = reqwest:: multipart:: Part :: text ( serde_json:: to_string ( & body) ?) ;
205
- json_part = json_part. file_name ( format ! ( "{}.json" , "event " ) ) ;
205
+ json_part = json_part. file_name ( format ! ( "{}.json" , "body " ) ) ;
206
206
json_part = json_part. mime_str ( "application/json" ) ?;
207
- form = form. part ( "event " , json_part) ;
207
+ form = form. part ( "body " , json_part) ;
208
208
for attachment in attachments {
209
209
form = form. part ( attachment. name . clone ( ) , attachment. try_into ( ) ?) ;
210
210
}
Original file line number Diff line number Diff line change @@ -294,9 +294,9 @@ impl Ml {
294
294
use std:: convert:: TryInto ;
295
295
let mut form = reqwest:: multipart:: Form :: new ( ) ;
296
296
let mut json_part = reqwest:: multipart:: Part :: text ( serde_json:: to_string ( & body) ?) ;
297
- json_part = json_part. file_name ( format ! ( "{}.json" , "texttocadmultifileiterationbody " ) ) ;
297
+ json_part = json_part. file_name ( format ! ( "{}.json" , "body " ) ) ;
298
298
json_part = json_part. mime_str ( "application/json" ) ?;
299
- form = form. part ( "texttocadmultifileiterationbody " , json_part) ;
299
+ form = form. part ( "body " , json_part) ;
300
300
for attachment in attachments {
301
301
form = form. part ( attachment. name . clone ( ) , attachment. try_into ( ) ?) ;
302
302
}
Original file line number Diff line number Diff line change @@ -1205,11 +1205,6 @@ fn get_function_body(
1205
1205
}
1206
1206
"multipart/form-data" => {
1207
1207
// The json part of multipart data is sent as a file.
1208
- let type_name = request_body
1209
- . type_name
1210
- . rendered ( ) ?
1211
- . replace ( "crate::types::" , "" )
1212
- . to_lowercase ( ) ;
1213
1208
if !multipart_has_body ( & request_body. type_name ) ? {
1214
1209
// We don't add the body to the form.
1215
1210
quote ! {
@@ -1234,9 +1229,9 @@ fn get_function_body(
1234
1229
// Add the body to the form.
1235
1230
1236
1231
let mut json_part = reqwest:: multipart:: Part :: text( serde_json:: to_string( & body) ?) ;
1237
- json_part = json_part. file_name( format!( "{}.json" , #type_name ) ) ;
1232
+ json_part = json_part. file_name( format!( "{}.json" , "body" ) ) ;
1238
1233
json_part = json_part. mime_str( "application/json" ) ?;
1239
- form = form. part( #type_name , json_part) ;
1234
+ form = form. part( "body" , json_part) ;
1240
1235
1241
1236
// For each of the files add them to the form.
1242
1237
for attachment in attachments {
You can’t perform that action at this time.
0 commit comments