Skip to content

Commit

Permalink
feat: remove hackish fix since mocktarget now supports query param args
Browse files Browse the repository at this point in the history
  • Loading branch information
danistrebel committed Aug 8, 2023
1 parent b3fcfb9 commit e4c2280
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ function onComplete(response,error) {

// update response payload with new patient name
var payload = JSON.parse(context.getVariable("response.content"));
payload.patient.display = response.content.substring(7, response.content.length-1)
payload.patient.display = response.content.asJSON.args.name;
context.setVariable("response.content", JSON.stringify(payload))

} else {
throw error;
}
}

// Make an additional request
httpClient.get("https://mocktarget.apigee.net/user?user=Mediated Display Name", onComplete);
httpClient.get("https://mocktarget.apigee.net/echo?name=Mediated Display Name", onComplete);

0 comments on commit e4c2280

Please sign in to comment.