HTTP Protocol
NOTE: Requires at least v2.6.0
In the 2.6.0 release we introduced basic support for reloading browsers & injecting files with command sent over HTTP. The main goal of this is to allow other tools and processes to trigger reloading and other functionality provided by the public API.
For example, http://localhost:3000/__browser_sync__?method=reload
translates
directly into the public API call browserSync.reload();
You can also pass arguments too, so...
GET http://localhost:3000/__browser_sync__?method=reload&args=core.min.css
... is equivalent to calling
browserSync.reload("core.min.css");
and for multiple arguments, just repeat the args
part
GET http://localhost:3000/__browser_sync__?method=reload&args=core.min.css&args=ie.min.css
... is equivalent to calling
browserSync.reload(["core.min.css", "ie.min.css"]);
Sections