code: function addContentType(req) {
      var httpRequest = req.httpRequest;
      if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') {
        // Content-Type is not set in GET/HEAD requests
        delete httpRequest.headers['Content-Type'];
        return;
      }
  
      if (!httpRequest.headers['Content-Type']) { // always have a Content-Type
        httpRequest.headers['Content-Type'] = 'application/octet-stream';
      }
  
      var contentType = httpRequest.headers['Content-Type'];
      if (AWS.util.isBrowser()) {
        if (typeof httpRequest.body === 'string' && !contentType.match(/;\s*charset=/)) {
          var charset = '; charset=UTF-8';
          httpRequest.headers['Content-Type'] += charset;
        } else {
          var replaceFn = function(_, prefix, charsetName) {
            return prefix + charsetName.toUpperCase();
          };
  
          httpRequest.headers['Content-Type'] =
            contentType.replace(/(;\s*charset=)(.+)$/, replaceFn);
        }
      }
    }
docs: Adds a default content type if none is supplied.
  
  @api private