mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 12:49:06 +00:00
Send to zulip
This commit is contained in:
18
aws/lambda-nodejs18.x/UpdateZulipStreams/node_modules/aws-sdk/lib/react-native/add-content-type.js
generated
vendored
Normal file
18
aws/lambda-nodejs18.x/UpdateZulipStreams/node_modules/aws-sdk/lib/react-native/add-content-type.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
function addContentType(req) {
|
||||
var httpRequest = req.httpRequest || {};
|
||||
var headers = httpRequest.headers;
|
||||
// We don't want to force a content type on presigned urls
|
||||
if (headers && !req.isPresigned()) {
|
||||
if (httpRequest.body && !headers['Content-Type']) {
|
||||
// React Native's android XHR requires Content-Type to be defined if there is a body
|
||||
headers['Content-Type'] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @api private
|
||||
*/
|
||||
module.exports = {
|
||||
addContentType: addContentType
|
||||
};
|
||||
Reference in New Issue
Block a user