Skip to content

Support multipart/form-data operations #130

@erunion

Description

@erunion

Operations with multipart/form-data content types are currently being generated with snippets that look like the following:

const sdk = require('api')('https://example.com/openapi.json');
    
sdk.post('/multipart', {orderId: '10'}, {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'})
  .then(res => res.json())
  .then(res => {
    console.log(res);
  });

Since the SDK is already aware that the operation is multipart/form-data, there should be no need to add the Content-Type header into the snippet.

Metadata

Metadata

Assignees

Labels

area:coreIssues related to `core`, which is the package that powers the SDKs at runtimearea:snippetsIssues related to code snippetsbugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions