diff --git a/src/lhisp-oauth-client.ts b/src/lhisp-oauth-client.ts index 174e00a..dfc7649 100644 --- a/src/lhisp-oauth-client.ts +++ b/src/lhisp-oauth-client.ts @@ -146,6 +146,7 @@ export class LhispOauthClient { data, params, contentType = ContentType.APPLICATION_JSON, + ...opt }: ExecutarRequestParams): Promise { try { await this.getAccessToken(); @@ -163,6 +164,7 @@ export class LhispOauthClient { headers, data, params, + ...opt, }); return response.data; @@ -183,7 +185,6 @@ export class LhispOauthClient { async get(opt: ExecutarRequestParams) { return this.executarRequest({ method: "GET", - contentType: opt.contentType || ContentType.APPLICATION_JSON, ...opt, }); } @@ -191,7 +192,6 @@ export class LhispOauthClient { async put(opt: ExecutarRequestParams) { return this.executarRequest({ method: "PUT", - contentType: opt.contentType || ContentType.APPLICATION_JSON, ...opt, }); } @@ -199,7 +199,6 @@ export class LhispOauthClient { async patch(opt: ExecutarRequestParams) { return this.executarRequest({ method: "PATCH", - contentType: opt.contentType || ContentType.APPLICATION_JSON, ...opt, }); } @@ -207,7 +206,6 @@ export class LhispOauthClient { async post(opt: ExecutarRequestParams) { return this.executarRequest({ method: "POST", - contentType: opt.contentType || ContentType.APPLICATION_JSON, ...opt, }); } @@ -215,7 +213,6 @@ export class LhispOauthClient { async delete(opt: ExecutarRequestParams) { return this.executarRequest({ method: "DELETE", - contentType: opt.contentType || ContentType.APPLICATION_JSON, ...opt, }); }