How to use the breeze-client.core function in breeze-client

To help you get started, we’ve selected a few breeze-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jdanyow / aurelia-breeze / src / ajax-adapter.js View on Github external
ajax(config) {
    // build the request info object.
    let requestInfo = {
      adapter: this,
      config: extend({}, config),
      zConfig: config,
      success: config.success,
      error: config.error
    };
    requestInfo.config.request = this.httpClient;
    requestInfo.config.headers = extend({}, config.headers);

    // submit the request-info for interception.
    if (breeze.core.isFunction(this.requestInterceptor)) {
      this.requestInterceptor(requestInfo);
      if (this.requestInterceptor.oneTime) {
        this.requestInterceptor = null;
      }
      if (!requestInfo.config) {
        return;
      }
    }

    config = requestInfo.config;
    let init = {
      method: config.type
    }
    // headers: fetch
    init.headers = new Headers();
    for (let header in config.headers) {
github jdanyow / aurelia-breeze / dist / aurelia-breeze.js View on Github external
ajax(config) {
    // build the request info object.
    let requestInfo = {
      adapter: this,
      config: extend({}, config),
      zConfig: config,
      success: config.success,
      error: config.error
    };
    requestInfo.config.request = this.httpClient;
    requestInfo.config.headers = extend({}, config.headers);

    // submit the request-info for interception.
    if (breeze.core.isFunction(this.requestInterceptor)) {
      this.requestInterceptor(requestInfo);
      if (this.requestInterceptor.oneTime) {
        this.requestInterceptor = null;
      }
      if (!requestInfo.config) {
        return;
      }
    }

    config = requestInfo.config;
    let init = {
      method: config.type
    }
    // headers: fetch
    init.headers = new Headers();
    for (let header in config.headers) {
github jdanyow / aurelia-breeze / dist / es2015 / aurelia-breeze.js View on Github external
var _dec, _class;

import breeze from 'breeze-client';
import { subscriberCollection, ObserverLocator } from 'aurelia-binding';
import { HttpClient } from 'aurelia-fetch-client';

const extend = breeze.core.extend;

export let HttpResponse = class HttpResponse {
  constructor(status, data, headers, config) {
    this.config = config;
    this.status = status;
    this.data = data;
    this.headers = headers;
  }

  getHeader(headerName) {
    return this.getHeaders(headerName);
  }

  getHeaders(headerName) {
    if (headerName === null || headerName === undefined || headerName === '') {
      return this.headers.headers;
github jdanyow / aurelia-breeze / src / ajax-adapter.js View on Github external
import breeze from 'breeze-client';

const extend = breeze.core.extend;

export class HttpResponse {
  constructor(status, data, headers, config) {
    this.config = config;
    this.status = status;
    this.data = data;
    this.headers = headers;
  }

  getHeader(headerName) {
    return this.getHeaders(headerName);
  }

  getHeaders(headerName) {
    if (headerName === null || headerName === undefined || headerName === '') {
      return this.headers.headers;
github jdanyow / aurelia-breeze / dist / native-modules / aurelia-breeze.js View on Github external
var _dec, _class;

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();



import breeze from 'breeze-client';
import { subscriberCollection, ObserverLocator } from 'aurelia-binding';
import { HttpClient } from 'aurelia-fetch-client';

var extend = breeze.core.extend;

export var HttpResponse = function () {
  function HttpResponse(status, data, headers, config) {
    

    this.config = config;
    this.status = status;
    this.data = data;
    this.headers = headers;
  }

  HttpResponse.prototype.getHeader = function getHeader(headerName) {
    return this.getHeaders(headerName);
  };

  HttpResponse.prototype.getHeaders = function getHeaders(headerName) {
github jdanyow / aurelia-breeze / dist / aurelia-breeze.js View on Github external
import breeze from 'breeze-client';
import {subscriberCollection,ObserverLocator} from 'aurelia-binding';
import {HttpClient} from 'aurelia-fetch-client';

const extend = breeze.core.extend;

export class HttpResponse {
  constructor(status, data, headers, config) {
    this.config = config;
    this.status = status;
    this.data = data;
    this.headers = headers;
  }

  getHeader(headerName) {
    return this.getHeaders(headerName);
  }

  getHeaders(headerName) {
    if (headerName === null || headerName === undefined || headerName === '') {
      return this.headers.headers;
github jdanyow / aurelia-breeze / dist / es2015 / aurelia-breeze.js View on Github external
ajax(config) {
    let requestInfo = {
      adapter: this,
      config: extend({}, config),
      zConfig: config,
      success: config.success,
      error: config.error
    };
    requestInfo.config.request = this.httpClient;
    requestInfo.config.headers = extend({}, config.headers);

    if (breeze.core.isFunction(this.requestInterceptor)) {
      this.requestInterceptor(requestInfo);
      if (this.requestInterceptor.oneTime) {
        this.requestInterceptor = null;
      }
      if (!requestInfo.config) {
        return;
      }
    }

    config = requestInfo.config;
    let init = {
      method: config.type
    };

    init.headers = new Headers();
    for (let header in config.headers) {
github jdanyow / aurelia-breeze / dist / native-modules / aurelia-breeze.js View on Github external
AjaxAdapter.prototype.ajax = function ajax(config) {
    var requestInfo = {
      adapter: this,
      config: extend({}, config),
      zConfig: config,
      success: config.success,
      error: config.error
    };
    requestInfo.config.request = this.httpClient;
    requestInfo.config.headers = extend({}, config.headers);

    if (breeze.core.isFunction(this.requestInterceptor)) {
      this.requestInterceptor(requestInfo);
      if (this.requestInterceptor.oneTime) {
        this.requestInterceptor = null;
      }
      if (!requestInfo.config) {
        return;
      }
    }

    config = requestInfo.config;
    var init = {
      method: config.type
    };

    init.headers = new Headers();
    for (var header in config.headers) {