superfaceai / one-sdk-js

1️⃣ One Node.js SDK for all the APIs you want to integrate with
https://superface.ai
MIT License
46 stars 3 forks source link

Allow setting binary data metadata #304

Closed freaz closed 1 year ago

freaz commented 1 year ago

Description

Example use in map

map Example {
  // need to do comlink variable assign to be able to use Script expression
  tmp = (input.file.name = input.filename)
  tmp = (input.file.mimetype = input.mimetype)

  http POST "/" {
    request "multipart/form-data" {
      body = {
        file: input.file
      }
    }

    response 200 {
      map result body
    }
  }
}

Motivation and Context

Comlink author may need to set mimetype or name from within the map.

Types of changes

Checklist: