Skip to content

Commit

Permalink
added client option request.ingoreVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
ortexx committed Feb 14, 2024
1 parent 03e7c30 commit c5ba502
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spreadable",
"version": "0.2.30",
"version": "0.2.31",
"description": "Decentralized network mechanism",
"bin": {
"spreadable": "./bin/index.js"
Expand Down
9 changes: 6 additions & 3 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,14 @@ module.exports = (Parent) => {
createDefaultRequestOptions(options = {}) {
const defaults = {
method: 'POST',
timeout: this.options.request.clientTimeout,
headers: {
timeout: this.options.request.clientTimeout
};

if(!this.options.request.ignoreVersion) {
defaults.headers = {
'client-version': this.getVersion()
}
};
}

if(this.options.auth) {
const username = this.options.auth.username;
Expand Down

0 comments on commit c5ba502

Please sign in to comment.