updating web.js with working post and put code