Added method for setting withCredentials. Can be set to either true or f...

...alse. Assertion added to the test-request-methods.js tests.