@@ -97,6 +97,7 @@ interface MultipartEntry {
97
97
serializationCallback ?: ModelSerializerFunction < Parsable > ;
98
98
}
99
99
100
+
100
101
export function serializeMultipartBody (
101
102
writer : SerializationWriter ,
102
103
multipartBody : Partial < MultipartBody > = new MultipartBody ( ) ,
@@ -123,16 +124,19 @@ export function serializeMultipartBody(
123
124
if ( first ) {
124
125
first = false ;
125
126
} else {
126
- writer . writeStringValue ( undefined , "" ) ;
127
+ writer . writeStringValue ( undefined , "\r\n " ) ;
127
128
}
128
129
writer . writeStringValue ( undefined , "--" + boundary ) ;
130
+ writer . writeStringValue ( undefined , "\r\n" ) ;
129
131
const part = parts [ partName ] ;
130
132
writer . writeStringValue ( "Content-Type" , part . contentType ) ;
133
+ writer . writeStringValue ( undefined , "\r\n" ) ;
131
134
writer . writeStringValue (
132
135
"Content-Disposition" ,
133
136
'form-data; name="' + part . originalName + '"' ,
134
137
) ;
135
- writer . writeStringValue ( undefined , "" ) ;
138
+ writer . writeStringValue ( undefined , "\r\n" ) ;
139
+ writer . writeStringValue ( undefined , "\r\n" ) ;
136
140
if ( typeof part . content === "string" ) {
137
141
writer . writeStringValue ( undefined , part . content ) ;
138
142
} else if ( part . content instanceof ArrayBuffer ) {
@@ -169,8 +173,9 @@ export function serializeMultipartBody(
169
173
) ;
170
174
}
171
175
}
172
- writer . writeStringValue ( undefined , "" ) ;
176
+ writer . writeStringValue ( undefined , "\r\n " ) ;
173
177
writer . writeStringValue ( undefined , "--" + boundary + "--" ) ;
178
+ writer . writeStringValue ( undefined , "\r\n" ) ;
174
179
}
175
180
176
181
export function deserializeIntoMultipartBody (
0 commit comments