Skip to content

Commit

Permalink
Use rules.payload when extracting data for event stream (#4607)
Browse files Browse the repository at this point in the history
* Use rules.payload when extracting data for event stream

* chore: npm run add-change

---------

Co-authored-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
  • Loading branch information
inf3rnus and trivikr committed May 23, 2024
1 parent c655efa commit 9fbf324
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-rest-json-7a3f1db2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "rest-json",
"description": "use rules.payload when extracting data for event stream"
}
3 changes: 2 additions & 1 deletion lib/protocol/rest_json.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var AWS = require('../core');
var util = require('../util');
var Rest = require('./rest');
var Json = require('./json');
Expand Down Expand Up @@ -75,7 +76,7 @@ function extractData(resp) {
var body = resp.httpResponse.body;
if (payloadMember.isEventStream) {
parser = new JsonParser();
resp.data[payload] = util.createEventStream(
resp.data[rules.payload] = util.createEventStream(
AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body,
parser,
payloadMember
Expand Down

0 comments on commit 9fbf324

Please sign in to comment.