Skip to content

Commit

Permalink
Cleanup base64 setter
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed Mar 16, 2021
1 parent 77eaeda commit f69907a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class API {
this._mimeTypes = props && props.mimeTypes && typeof props.mimeTypes === 'object' ? props.mimeTypes : {}
this._serializer = props && props.serializer && typeof props.serializer === 'function' ? props.serializer : JSON.stringify
this._errorHeaderWhitelist = props && Array.isArray(props.errorHeaderWhitelist) ? props.errorHeaderWhitelist.map(header => header.toLowerCase()) : []
this._isBase64 = props && !!props.isBase64
this._isBase64 = props && typeof props.isBase64 === 'boolean' ? props.isBase64 : false
this._headers = props && props.headers && typeof props.headers === 'object' ? props.headers : {}

// Set sampling info
Expand Down
2 changes: 1 addition & 1 deletion lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class RESPONSE {
this._headers = Object.assign({
// Set the Content-Type by default
'content-type': ['application/json'], //charset=UTF-8
}, app._headers || {})
}, app._headers)

// base64 encoding flag
this._isBase64 = app._isBase64
Expand Down

0 comments on commit f69907a

Please sign in to comment.