Merged in development (pull request #11)

feat: add method PATCH
This commit is contained in:
Leandro Costa 2023-11-09 00:01:05 +00:00
commit 71515ac7e8
3 changed files with 12 additions and 3 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "lhisp-oauth-client",
"version": "1.0.15",
"version": "1.0.16",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "lhisp-oauth-client",
"version": "1.0.15",
"version": "1.0.16",
"license": "MIT",
"dependencies": {
"axios": "^1.4.0",

View file

@ -1,6 +1,6 @@
{
"name": "lhisp-oauth-client",
"version": "1.0.15",
"version": "1.0.16",
"main": "src/index",
"types": "src/index.d.ts",
"repository": "git@bitbucket.org:leandro_costa/lhisp-oauth-client.git",

View file

@ -191,6 +191,15 @@ export class LhispOauthClient<iAccessToken extends AccessToken = AccessToken> {
});
}
async patch<ResponseType>({ path, data, contentType = ContentType.APPLICATION_JSON }: ExecutarRequestParams) {
return this.executarRequest<ResponseType>({
method: "PATCH",
path,
data,
contentType,
});
}
async post<ResponseType>({ path, data, contentType = ContentType.APPLICATION_JSON }: ExecutarRequestParams) {
return this.executarRequest<ResponseType>({
method: "POST",