Inject buffer to res object