Skip to content

HTTP client for REST-like calls based on service discovery

Notifications You must be signed in to change notification settings

melmedia/rest-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS REST client with service discovery

  • NodeJS, Typescript
  • Service discovery based on JSON configuration

Usage

  export class ClientServiceWrapper extends ServiceWrapper {
    protected get serviceName() {
      return 'client';
    }
  }

  const serviceDiscovery = new ConfigServiceDiscovery({
    "client": "http://127.0.0.1:32978",
    "expertAuth": "http://127.0.0.1:26459",
    "expertUser": "http://127.0.0.1:16028"
  })

  const clientService = new ClientServiceWrapper(serviceDiscovery);
  const clients = await clientService.get<User[]>('users', { status: 'active' });

About

HTTP client for REST-like calls based on service discovery

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%