Closed
Description
Bug report
Describe the bug
FunctionInvokeOptions
overrides the specified Content-Type
header value to application/octet-stream
when body
is of type Data
.
To Reproduce
let boundary = "Boundary-\(UUID().uuidString)"
let contentType = "multipart/form-data; boundary=\(boundary)"
let options = FunctionInvokeOptions(
headers: ["Content-Type": contentType],
body: "binary value".data(using: .utf8)!
)
print(options.headers)
Output
["Content-Type": "application/octet-stream"]
Expected behavior
Functions are invoked with the specified Content-Type
header value.
System Information
functions-swift
:1.0.0
Additional context
I'm trying to invoke a function that handles multipart/form-data requests (based on this example function).