You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems that when passing a Buffer in const options = { data: Buffer.from('foo') }, centra would handle it as json since typeof Buffer resolves to object.
I see two solutions here:
default sendAs to 'raw', which would become a breaking change (since currently 'json' is assumed
add options.buffer and leave options.data as is. When options.buffer is used, call req.body(options.buffer, 'raw')
Thoughts? Happy to provide PR after discussion about suggested options
The text was updated successfully, but these errors were encountered:
it seems that when passing a
Buffer
inconst options = { data: Buffer.from('foo') }
,centra
would handle it asjson
sincetypeof Buffer
resolves toobject
.I see two solutions here:
sendAs
to'raw'
, which would become a breaking change (since currently'json'
is assumedoptions.buffer
and leaveoptions.data
as is. Whenoptions.buffer
is used, callreq.body(options.buffer, 'raw')
Thoughts? Happy to provide PR after discussion about suggested options
The text was updated successfully, but these errors were encountered: