mirror of
https://github.com/appium/appium.git
synced 2026-01-24 03:11:04 -06:00
16 lines
380 B
JavaScript
16 lines
380 B
JavaScript
"use strict";
|
|
|
|
var _s = require('underscore.string');
|
|
|
|
module.exports.parserWrap = function (req, res, next) {
|
|
// allow guineapig
|
|
if (!_s.startsWith(req.path, "/test")) {
|
|
// hack because python client library sux
|
|
if (req.headers['content-type'] === 'application/x-www-form-urlencoded') {
|
|
req.headers['content-type'] = 'application/json';
|
|
}
|
|
}
|
|
|
|
next();
|
|
};
|