Request options and error handling

I added the possibility to add request default options as well as sending out possible errors from request to the client.