Sha256: 5fc5fb2b6c5a4f9043973ecee08050654aed714a2787feabdcb46d2ee77503c4

Contents?: true

Size: 685 Bytes

Versions: 35

Compression:

Stored size: 685 Bytes

Contents

var AWS = require('../core');

AWS.util.update(AWS.APIGateway.prototype, {
/**
 * Sets the Accept header to application/json.
 *
 * @api private
 */
  setAcceptHeader: function setAcceptHeader(req) {
    var httpRequest = req.httpRequest;
    httpRequest.headers['Accept'] = 'application/json';
  },

  /**
   * @api private
   */
  setupRequestListeners: function setupRequestListeners(request) {
    request.addListener('build', this.setAcceptHeader);
    if (request.operation === 'getExport') {
      var params = request.params || {};
      if (params.exportType === 'swagger') {
        request.addListener('extractData', AWS.util.convertPayloadToString);
      }
    }
  }
});

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
sumomo-0.8.7 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.8.6 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.8.4 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.8.3 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.8.2 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.8.1 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.8.0 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.7.3 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.7.2 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.7.1 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.6.4 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.6.3 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.6.2 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.6.1 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js
sumomo-0.6.0 data/sumomo/api_modules/node_modules/aws-sdk/lib/services/apigateway.js