working get and post requests
using resources
changed to postregesql