[lib.client.xhr] added DEBUG mode
This commit is contained in:
parent
bb0bfb5065
commit
97617181b9
|
@ -2,6 +2,8 @@ import ClientDriver from './client-driver.js'
|
|||
|
||||
export default class XHRClientDriver extends ClientDriver{
|
||||
|
||||
static get DEBUG(){ return true; }
|
||||
|
||||
|
||||
/* (1) Creates a client driver
|
||||
*
|
||||
|
@ -158,9 +160,13 @@ export default class XHRClientDriver extends ClientDriver{
|
|||
/* (3) Open connection */
|
||||
this.xhr.open(http_method, `${protocol}${request_uri}`, true);
|
||||
|
||||
/* (3) Send request */
|
||||
/* (4) Send request */
|
||||
this.xhr.send(form_data);
|
||||
|
||||
/* (5) DEBUG */
|
||||
( XHRClientDriver.DEBUG ) && console.log(`XHRClientDriver(url '${protocol}${request_uri}', form '`, form_data, `'`);
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue