Skip to content

Commit

Permalink
Updated middleware tosend Accept and Contenttype headers to underlyin…
Browse files Browse the repository at this point in the history
…g webhook
  • Loading branch information
pradeepmvn committed Nov 13, 2017
1 parent 3f3609c commit ae3a1e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/routes/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ function updateAndSendRasaResponse(req,cacheKey,rasa_response, modelName, projec
request.post({
url: data[0].endpoint_url,
headers : {
"Authorization" : "Bearer "+req.original_token
},
form: rasa_response
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization" : "Bearer "+req.original_token
},
body: JSON.stringify(rasa_response)
},
function (error, response, body){
if(error){
Expand Down
1 change: 1 addition & 0 deletions web/src/app/components/training/training.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<div class="col-sm-3">
<button type="button" class="btn btn-success" ng-show="exportdata !== undefined" ng-click="train()"><i class="fa fa-magic"></i>&nbsp; Start Training</button>
<button type="button" class="btn btn-secondary" ng-show="exportdata !== undefined" ng-click="savetofile()"><i class="fa fa-file"></i>&nbsp; Download File</button>
<a href="" id="a"></a>
</div>
<div class="col-sm-3">
<span ng-show="exportdata !== undefined" >To Lower case <label class="switch switch-3d switch-success" ng-show="exportdata !== undefined">
Expand Down

0 comments on commit ae3a1e9

Please sign in to comment.