@designliquido/delegua-http 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +10 -1
- package/index.js +10 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { ClienteHttp } from "./fontes/cliente-http";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Monta o cliente HTTP básico para requisições.
|
|
4
|
+
* @param {any} _ O visitante da instrução, normalmente um interpretador.
|
|
5
|
+
* @param {string} urlBase O prefixo do endereço para a requisição. Por exemplo, https://designliquido.com.br.
|
|
6
|
+
* @param {number} tempoMaximo O tempo máximo de espera para uma requisição responder, em milisegundos.
|
|
7
|
+
* Por padrão, 5000 ms (5 segundos).
|
|
8
|
+
* @param {any} cabecalhos Configurações adicionais de cabeçalhos.
|
|
9
|
+
* @returns {ClienteHttp} Um cliente HTTP configurado e pronto para uso.
|
|
10
|
+
*/
|
|
11
|
+
export declare function novoClienteHttp(_: any, urlBase?: string, tempoMaximo?: number, cabecalhos?: any): ClienteHttp;
|
|
3
12
|
export * from './fontes/resposta-http';
|
package/index.js
CHANGED
|
@@ -16,7 +16,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.novoClienteHttp = void 0;
|
|
18
18
|
const cliente_http_1 = require("./fontes/cliente-http");
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Monta o cliente HTTP básico para requisições.
|
|
21
|
+
* @param {any} _ O visitante da instrução, normalmente um interpretador.
|
|
22
|
+
* @param {string} urlBase O prefixo do endereço para a requisição. Por exemplo, https://designliquido.com.br.
|
|
23
|
+
* @param {number} tempoMaximo O tempo máximo de espera para uma requisição responder, em milisegundos.
|
|
24
|
+
* Por padrão, 5000 ms (5 segundos).
|
|
25
|
+
* @param {any} cabecalhos Configurações adicionais de cabeçalhos.
|
|
26
|
+
* @returns {ClienteHttp} Um cliente HTTP configurado e pronto para uso.
|
|
27
|
+
*/
|
|
28
|
+
function novoClienteHttp(_, urlBase = "", tempoMaximo = 5000, cabecalhos = {}) {
|
|
20
29
|
return new cliente_http_1.ClienteHttp(urlBase, tempoMaximo, cabecalhos);
|
|
21
30
|
}
|
|
22
31
|
exports.novoClienteHttp = novoClienteHttp;
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wDAAoD;AAEpD,SAAgB,eAAe,CAAC,UAAkB,EAAE,EAAE,cAAsB,IAAI,EAAE,aAAkB,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wDAAoD;AAEpD;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,CAAM,EAAE,UAAkB,EAAE,EAAE,cAAsB,IAAI,EAAE,aAAkB,EAAE;IAC1G,OAAO,IAAI,0BAAW,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAC7D,CAAC;AAFD,0CAEC;AAED,yDAAuC"}
|