File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ class APIClient {
77
77
$headers [] = " api_key: " . $this -> apiKey ;
78
78
}
79
79
80
- if (is_object($postData) or is_array($postData)) {
80
+
81
+ if (strpos($headers['Content-Type'], "multipart/form-data") < 0 and (is_object($postData) or is_array($postData))) {
81
82
$postData = json_encode($this -> sanitizeForSerialization ($postData ));
82
83
}
83
84
Original file line number Diff line number Diff line change @@ -72,7 +72,12 @@ class {{classname}} {
72
72
}
73
73
{ {#formParams} }
74
74
if(${ {paramName} } != null) {
75
+ {{#notFile} }
75
76
$body['{ {paramName} }'] = ${ {paramName} };
77
+ { {/notFile} }
78
+ { {#isFile} }
79
+ $body['{ {paramName} }'] = '@' . ${ {paramName} };
80
+ { {/isFile} }
76
81
}
77
82
{ {/formParams} }
78
83
if (empty($body)) {
You can’t perform that action at this time.
0 commit comments