Skip to content

Commit

Permalink
ON-45261 # Fix value of request header x-oneblink-request-body not …
Browse files Browse the repository at this point in the history
…being encoded
  • Loading branch information
kizaonline committed Nov 27, 2024
1 parent 284479f commit cc15b9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Value of request header `x-oneblink-request-body` not being encoded

## [2.1.1] - 2024-09-03

### Dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/OneBlinkRequestHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class OneBlinkRequestHandler<T>

async handle(request: HttpRequest) {
if (this.requestBodyHeader) {
request.headers['x-oneblink-request-body'] = JSON.stringify(
this.requestBodyHeader,
request.headers['x-oneblink-request-body'] = encodeURIComponent(
JSON.stringify(this.requestBodyHeader),
)
}

Expand Down

0 comments on commit cc15b9f

Please sign in to comment.