const proto = {}
function set(type, property) {
proto.__defineSetter__(property, function(val) {
this[type][property] = val
})
}
function get(type, property) {
proto.__defineGetter__(property, function() {
return this[type][property]
})
}
const setRequest = []
const getRequest = ['query']
const setResponse = ['body', 'statusCode']
const getResponse = ['body', 'statusCode']
getRequest.forEach(r => {
get('request', r)
})
setResponse.forEach(r => {
set('response', r)
})
getResponse.forEach(r => {
get('response', r)
})
module.exports = proto