1.0.13 • Published 3 years ago

@domoskanonos/nidoca-http v1.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

nidoca-http

nidoca http helper classes to fetch data from server. based on web fetch api https://fetch.spec.whatwg.org/

project info
npmPublished on npm Published on npm Published on npm Published on npm Published on npm
githubPublished on git

HttpClientService usage in typescript

const httpClientProperties: HttpClientProperties = new HttpClientProperties();  
httpClientProperties.baseURL = "http://localhost";
httpClientProperties.port = "8090";
  
const httpClientService : HttpClientService = 
    new HttpClientService(httpClientProperties),

const request: HttpClientRequest = httpClientService.getDefaultGetRequestInstance();
request.path = this.path.concat("/PATH");
request.requestMethod = HttpClientRequestType.POST;
request.body = {};
const response = await this.httpClient.request(request);
const bodyText: string = await response.text();
const myResponseBodyObject = JSON.parse(bodyText);
1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.0

3 years ago