just-api icon indicating copy to clipboard operation
just-api copied to clipboard

Suite custom_configuration from module ignores common_headers

Open matmar10 opened this issue 5 years ago • 0 comments

Steps to reproduce

configuration:
  custom_configuration:
    run_type: module
    module:
      module_path: some-module.js
      function_name: suiteConfigSync
specs:
  - name: uses suite-level custom_configuration content-type header
    request:
      path: /echoJSONBodyResponse
      method: post
      payload:
          body:
              type: json
              content:
                  name: Kiran
    response:
        status_code: 200
module.exports = {
  suiteConfigSync: function() {
    this.common_headers = [{
      name: 'content-type',
      value: 'application/json'
    }];
  }
};

Actual Behavior

InvalidRequestHeaderError: Request method is post,request body is provided but Content-Type header is not provided

Expected Behavior

common_headers should be honored

matmar10 avatar Jul 26 '20 07:07 matmar10