File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,18 @@ export function buildRequest({
175175 // only attach body if the requestBody has a definition for the
176176 // contentType that has been explicitly set
177177 if ( requestContentType === 'application/x-www-form-urlencoded' ) {
178- req . form = requestBody
178+ if ( typeof requestBody === 'object' ) {
179+ req . form = { }
180+ Object . keys ( requestBody ) . forEach ( ( k ) => {
181+ const val = requestBody [ k ]
182+ req . form [ k ] = {
183+ value : val
184+ }
185+ } )
186+ }
187+ else {
188+ req . form = requestBody
189+ }
179190 }
180191 else {
181192 req . body = requestBody
@@ -187,6 +198,7 @@ export function buildRequest({
187198 }
188199 }
189200
201+
190202 // Add securities, which are applicable
191203 // REVIEW: OAS3: what changed in securities?
192204 req = applySecurities ( { request : req , securities, operation, spec} )
You can’t perform that action at this time.
0 commit comments