1.3.0 • Published 3 months ago

http-service-lib v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Http Service Lib

Presenting a reusable http library to Node.Js. This library uses well defined http client solutions to deliver scalable and reusable http services.

Simple usage to perform JSON request

import { apiURL } from 'consts';
import { HttpPostService, HttpError, HttpJSONRequest } from 'http-service-lib';

async function login({ email, password }: { email: string; password: string }) {
	const data = await this.httpPostService.post<{ accessToken: string }>(
		new HttpJSONRequest(
			`${apiURL}/users/sessions`,
			{
				Authorization: 'Basic 123',
			},
			{
				email,
				password,
			}
		)
	);
	return data.body;
}
1.3.0

3 months ago

1.2.1

3 months ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago