Sha256: 8daf81a5b155c2e54318a3c66f0d29d6cab233728b49c431f05a1c01bfc0af0e
Contents?: true
Size: 463 Bytes
Versions: 35
Compression:
Stored size: 463 Bytes
Contents
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'] = ''; } } } module.exports = { addContentType: addContentType };
Version data entries
35 entries across 35 versions & 1 rubygems