BREAKING CHANGE: The request method of Proxy class now accepts and returns axios-specific values
BREAKING CHANGE: The default value of keepAlive setting has been changed to true
* Properly handle MJSONWP responses with non-zero status and return code < 400
* code 500 looks more appopriate
* Optimize downstream protocol detection
* Update the unit test
* Update errors handling inside proxyReqRes
* Improve the condition
* Try to fix the destination URL if the upstream and downstream drivers operate different procotols
* detect route name in smarter manner
* Fix command name extraction
* consider the situation where url is equal to the endpoint
* Simplify helper functions
* Refactor command name extraction
* Refactor urls fixing
* Cache downstream procotol
* speed up downstream protocol detection
* Address comments
* Minor tunings
* Do proxying for W3C responses
* If a W3C Response is provided by a proxy, map to the correct error
* Checks if `value` is an object and `value.error` and maps it based on that (`value.error` is the W3C error code)
* Broke off `errorFromCode` into `errorFromMJSONWPStatusCode` and `errorFromW3CJsonCode`
* Rename '.error' property to correct W3C property
* The error property in the ProtocolError objects should match up with https://www.w3.org/TR/webdriver/#handling-errors under the 'JSON Error Code' column
* Added tests for all of these
* Make ProxyRequestError work for W3C
* Added an arg called `.w3c` that passes in the proxied W3C error
* Fixed the `getActualError` function that looks for the .w3c variable and parses error from the code
* Rename 'mjsonwp' to 'protocol'
* Renamed folder from 'mjsonwp' to 'protocol' in `lib/` and `test/`
* Renamed 'mjsonwp.js' to 'protocol.js'
* Renamed any import statements that use 'mjsonwp'
* _Possible breaking change_: MJSONWireProtocol class exposed in index was renamed to just Protocol.... checked Appium repo and found no libraries that use MJSONWireProtocol
* Lint fix
* * Make sure to detect a non-working chromedriver connection after calling androidDriver.closeApp() and androidDriver.launchApp() by returning the result body (resBody) only if it does not contain a status code
* Adapted unit test to cover the case when chromedriver responds with http
200 but status code != 0 (which represents an error)
Also fixed a typo in another test description