9.0.5 • Published 11 months ago

@delight-rpc/http-client v9.0.5

Weekly downloads
324
License
MIT
Repository
github
Last release
11 months ago

@delight-rpc/http-client

The HTTP client library of delight-rpc, it needs to be used with the server implementation @delight-rpc/http-server.

Install

npm install --save @delight-rpc/http-client
# or
yarn add @delight-rpc/http-client

Usage

interface IAPI {
  echo(message: string): string
}

const client = createClient<IAPI>({
  server: 'http://localhost:8080'
, keepalive: true
})

await client.echo('hello')

API

interface IClientOptions {
  server: string
  timeout?: number
  keepalive?: boolean
  basicAuth?: {
    username: string
    password: string
  }
}

createClient

function createClient<IAPI extends object>(
  clientOptions: IClientOptions
, options?: {
    parameterValidators?: DelightRPC.ParameterValidators<IAPI>
    expectedVersion?: string
    channel?: string
  }
): DelightRPC.ClientProxy<IAPI>

createBatchClient

function createBatchClient(
  clientOptions: IClientOptions
, options?: {
    expectedVersion?: string
    channel?: string
  }
): DelightRPC.BatchClient
9.0.5

11 months ago

9.0.4

1 year ago

9.0.3

1 year ago

9.0.2

1 year ago

9.0.1

1 year ago

9.0.0

1 year ago

7.1.3

2 years ago

7.2.3

2 years ago

7.2.2

2 years ago

7.2.1

2 years ago

7.2.0

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

8.0.3

2 years ago

8.0.2

2 years ago

7.1.2

2 years ago

7.1.1

2 years ago

7.1.0

2 years ago

5.1.1

2 years ago

6.0.0

2 years ago

7.0.0

2 years ago

5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.0

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

3.0.0

2 years ago

1.0.0

2 years ago

0.3.10

2 years ago

0.3.9

3 years ago

0.3.6

3 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.2.15

3 years ago

0.3.0

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago