Skip to content

Commit e07a50c

Browse files
authored
Updated readme
1 parent 54c2ab5 commit e07a50c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,26 @@ function getRequestUrlWithoutToken(requestUrl){
328328

329329
module.exports = router;
330330
```
331+
332+
333+
## Request body trigger (advanced)
334+
335+
The connector supports triggering on request body content. An example could be a POST call with specific item ID where you want end-users to queue up for.
336+
For this to work, you will need to contact Queue-it support or enable request body triggers in your integration settings in your GO Queue-it platform account.
337+
Once enabled you will need to update your integration so request body is available for the connector.
338+
You may need to add the following middleware in your express app:
339+
340+
```javascript
341+
const bodyParser = require('body-parser');
342+
343+
// ... in your app setup
344+
345+
app.use(bodyParser.text());
346+
```
347+
348+
And then add this to the httpRequest object in your http context provider:
349+
```javascript
350+
getRequestBodyAsString: function () {
351+
return JSON.stringify(req.body.toString());
352+
}
353+
```

0 commit comments

Comments
 (0)