1.0.13 • Published 4 years ago

@domoskanonos/nidoca-http v1.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
4 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

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.0

4 years ago