How to use the @foal/core.getHttpMethod function in @foal/core

To help you get started, we’ve selected a few @foal/core 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 FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.ts View on Github external
it('should handle requests at GET /:testFooBarId.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'getById'), 'GET');
      strictEqual(getPath(TestFooBarController, 'getById'), '/:testFooBarId');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at DELETE /.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'delete'), 'DELETE');
      strictEqual(getPath(TestFooBarController, 'delete'), '/');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at POST /.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'post'), 'POST');
      strictEqual(getPath(TestFooBarController, 'post'), '/');
    });
github FoalTS / foal / packages / cli / src / generate / specs / rest-api / test-foo-bar.controller.spec.current-dir.ts View on Github external
it('should handle requests at GET /:testFooBarId.', () => {
      strictEqual(getHttpMethod(TestFooBarController, 'getById'), 'GET');
      strictEqual(getPath(TestFooBarController, 'getById'), '/:testFooBarId');
    });
github FoalTS / foal / packages / swagger / src / swagger-controller.spec.ts View on Github external
it('should handle requests at GET /.', () => {
      strictEqual(getHttpMethod(ConcreteClass, 'swaggerUiBundle'), 'GET');
      strictEqual(getPath(ConcreteClass, 'swaggerUiBundle'), '/swagger-ui-bundle.js');
    });
github FoalTS / foal / packages / examples / src / app / controllers / product.controller.spec.ts View on Github external
it('should handle requests at GET /.', () => {
      strictEqual(getHttpMethod(ProductController, 'get'), 'GET');
      strictEqual(getPath(ProductController, 'get'), '/');
    });
github FoalTS / foal / packages / examples / src / app / controllers / view.controller.spec.ts View on Github external
it('should handle requests at GET /admin.', () => {
      strictEqual(getHttpMethod(ViewController, 'admin'), 'GET');
      strictEqual(getPath(ViewController, 'admin'), '/admin');
    });
github FoalTS / foal / packages / examples / src / app / controllers / product.controller.spec.ts View on Github external
it('should handle requests at DELETE /:id.', () => {
      strictEqual(getHttpMethod(ProductController, 'deleteById'), 'DELETE');
      strictEqual(getPath(ProductController, 'deleteById'), '/:id');
    });
github FoalTS / foal / packages / examples / src / app / controllers / product.controller.spec.ts View on Github external
it('should handle requests at GET /:id.', () => {
      strictEqual(getHttpMethod(ProductController, 'getById'), 'GET');
      strictEqual(getPath(ProductController, 'getById'), '/:id');
    });
github FoalTS / foal / packages / cli / src / generate / templates / app / src / app / controllers / view.controller.spec.ts View on Github external
it('should handle requests at Get /.', () => {
      strictEqual(getHttpMethod(ViewController, 'index'), 'GET');
      strictEqual(getPath(ViewController, 'index'), '/');
    });