2.4.1 • Published 7 years ago

@strictd/madame v2.4.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

NgX client side http proxy library with jwt and sockets

Typescript only library

NGX Implementation

app.module addition, import recaptcha component to imports

import { MadameModule } from '@strictd/madame';

@NgModule({
  imports: [
    MadameModule.forRoot()
  ]
})

Component TS / HTML Addition

import { MadameService } from '../../../../../_shared/madame/madame-service';

// export class <myclass> {
  constructor(private service: MadameService) {
    service.setServer('main', 'http://localhost:3000/'); // <-- Set your API url

//    // Set madames event emitter is actively running request;
//    this.localRunningHook = service.getRunningHook().subscribe(
//      (isRunning: boolean) => { console.log('Madame Running: ' + isRunning.toString()); }
//    );
  }

//  // Destroy subscription to the service running hook
//  ngOnDestroy() {
//    this.localRunningHook.unsubscribe();
//  }

  runRequests() {
    this.service.post('myapi/endpoint.php', {foo: 'bar'}).then(resp => {
      console.log('Request Response', resp);
    });

    this.service.get('myapi/endpoint.php',).then(resp => {
      console.log('Request Response', resp);
    });

    this.service.authPost('myapi/endpoint.php', {foo: 'bar'}).then(resp => {
      console.log('Request Response', resp);
    });
  }
//}
2.4.1

7 years ago

2.4.0

7 years ago

2.3.5

7 years ago

2.3.4

7 years ago

2.3.3

7 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.8

7 years ago

2.2.7

7 years ago

2.2.6

7 years ago

2.2.5

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.1

7 years ago

1.0.0

7 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago