electron/browser/api/lib/protocol.coffee

12 lines
375 B
CoffeeScript
Raw Normal View History

2013-08-24 07:26:10 +00:00
module.exports = process.atomBinding 'protocol'
module.exports.RequestStringJob =
class RequestStringJob
constructor: ({mimeType, charset, data}) ->
if typeof data isnt 'string' and not data instanceof Buffer
throw new TypeError('Data should be string or Buffer')
@mimeType = mimeType ? 'text/plain'
@charset = charset ? 'UTF-8'
@data = String data