registerHttpProtocol
abstract fun registerHttpProtocol(scheme: String, handler: (request: ProtocolRequest, callback: (response: ProtocolResponse) -> Unit) -> Unit): Boolean(source)
Whether the protocol was successfully registered
Registers a protocol of scheme
that will send an HTTP request as a response.
The usage is the same with registerFileProtocol
, except that the callback
should be called with an object that has the url
property.