createTransaction(transition, method, schemes) {
    const { HttpRequest, HttpResponse, HttpTransaction } = this.namespace.elements;
    const transaction = new HttpTransaction();
    transaction.content = [new HttpRequest(), new HttpResponse()];

    if (transition) {
      transition.content.push(transaction);
    }

    if (method) {
      transaction.request.method = method.toUpperCase();

      if (this.generateSourceMap) {
        this.createSourceMap(transaction.request.attributes.get('method'), this.path);
      }
    }

    if (schemes.length) {
      transaction.attributes.set('authSchemes', schemes.map(scheme => scheme.clone()));
    }

    return transaction;
  }
// Create a new Refract transition element with a blank request and response.
Create a new Refract transition element with a blank request and response.
Create a new Refract transition element with a blank request and response .
createTransaction(transition, method, schemes) {
    const { HttpRequest, HttpResponse, HttpTransaction } = this.namespace.elements;
    const transaction = new HttpTransaction();
    transaction.content = [new HttpRequest(), new HttpResponse()];
    if (transition) {
      transition.content.push(transaction);
    }
    if (method) {
      transaction.request.method = method.toUpperCase();
      if (this.generateSourceMap) {
        this.createSourceMap(transaction.request.attributes.get('method'), this.path);
      }
    }
    if (schemes.length) {
      transaction.attributes.set('authSchemes', schemes.map(scheme => scheme.clone()));
    }
    return transaction;
  }
createTransaction ( transition , method , schemes ) { const { HttpRequest , HttpResponse , HttpTransaction } = this . namespace . elements ; const transaction = new HttpTransaction ( ) ; transaction . content = [ new HttpRequest ( ) , new HttpResponse ( ) ] ; if ( transition ) { transition . content . push ( transaction ) ; } if ( method ) { transaction . request . method = method . toUpperCase ( ) ; if ( this . generateSourceMap ) { this . createSourceMap ( transaction . request . attributes . get ( 'method' ) , this . path ) ; } } if ( schemes . length ) { transaction . attributes . set ( 'authSchemes' , schemes . map ( scheme => scheme . clone ( ) ) ) ; } return transaction ; }
Create a new Refract transition element with a blank request and response.
Create a new Refract transition element with a blank request and response .