7.8 - C3.network.C3Request raising error

#1

I have a call in a UI helper function to query = new C3.network.C3Request … I’m facing this error: “Cannot read property ‘C3Request’ of undefined” … is the C3.network modified in 7.8 ?

0 Likes

#2

Try with UINetworkC3Request, here is an example:

  UINetworkC3Request.init({
    autoExecute: true,
    environment: this.get('environment'),
    c3type: 'SomeType',
    c3function: 'targetFunction',
    c3arguments: {
      funcArgName: value
    },
    success: function (xhr) {
      var responseData = xhr.response.get('data');
      ...
    },
    failure: function (xhr) {
      var error = xhr.response.get('data');
      self.showError(error);
    }
  });

Or, if you want to trigger the request manually: do not set autoExecute to true

var req = UINetworkC3Request.init({
    // autoExecute: true,
    . . .
});
req.execute();
0 Likes

Downloading S3 File through UI Action