File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
templates/ruby/lib/container Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ module {{ spec.title | caseUcfirst }}
213
213
when 'application/json'
214
214
payload = params.to_json
215
215
when 'multipart/form-data'
216
- payload = encode_form_data(params) + "\r\n --#{@boundary}--"
216
+ payload = encode_form_data(params) + "--#{@boundary}--\r\n "
217
217
headers[:'content-type'] = "multipart/form-data; boundary=#{@boundary}"
218
218
else
219
219
payload = encode(params)
@@ -284,17 +284,18 @@ module {{ spec.title | caseUcfirst }}
284
284
else
285
285
post_body = []
286
286
if value.instance_of? InputFile
287
- post_body << "--#{@boundary}\r\n"
288
- post_body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{value.filename}\"\r\n"
289
- post_body << "Content-Type: #{value.mime_type}\r\n\r\n"
287
+ post_body << "--#{@boundary}"
288
+ post_body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{value.filename}\""
289
+ post_body << "Content-Type: #{value.mime_type}"
290
+ post_body << ""
290
291
post_body << value.data
291
-
292
292
else
293
- post_body << "--#{@boundary}\r\n"
294
- post_body << "Content-Disposition: form-data; name=\"#{key}\"\r\n\r\n"
295
- post_body << "#{value.to_s}"
293
+ post_body << "--#{@boundary}"
294
+ post_body << "Content-Disposition: form-data; name=\"#{key}\""
295
+ post_body << ""
296
+ post_body << value.to_s
296
297
end
297
- post_body.join
298
+ post_body.join("\r\n") + "\r\n"
298
299
end
299
300
end
300
301
You can’t perform that action at this time.
0 commit comments