Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Merge 2c33f39 into 1ac2b6c
Browse files Browse the repository at this point in the history
  • Loading branch information
smolijar committed Mar 20, 2019
2 parents 1ac2b6c + 2c33f39 commit 1d6aae8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- PATCH for Microservice
- general HTTP method call for Microservice

## [0.5.4] - 2019-02-18
### Added
Expand Down
8 changes: 8 additions & 0 deletions src/lib/Microservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ export default class Microservice {
return this.request(pathName, { ...options, body: payload, method: 'PUT' });
}

public patch(pathName: string = '/', payload: object = {}, options: object = {}) {
return this.request(pathName, { ...options, body: payload, method: 'PATCH' });
}

public post(pathName: string = '/', payload: any = {}, options: object = {}) {
return this.request(pathName, { ...options, body: payload, method: 'POST' });
}
Expand All @@ -145,6 +149,10 @@ export default class Microservice {
return this.request(pathName, { ...options, method: 'DELETE' });
}

public otherMethod(method: string, pathName: string = '/', payload: object = {}, options: object = {}) {
return this.request(pathName, { ...options, body: payload, method });
}

/**
* Create a statusCode handler for throwing error on other than specified codes
*
Expand Down

0 comments on commit 1d6aae8

Please sign in to comment.