Sha256: 2f6ec48d27d0661d5256638354a819467fb63d88a3de471a93d363e8410a7be6

Contents?: true

Size: 510 Bytes

Versions: 43

Compression:

Stored size: 510 Bytes

Contents

var Buffer = require('buffer').Buffer
var test = require('tape')

var http = require('../..')

test('cookie', function (t) {
  var cookie = 'hello=world'
  window.document.cookie = cookie

  http.get({
    path: '/cookie',
    withCredentials: false
  }, function (res) {
    var buffers = []

    res.on('end', function () {
      t.ok(new Buffer(cookie).equals(Buffer.concat(buffers)), 'hello cookie echoed')
      t.end()
    })

    res.on('data', function (data) {
      buffers.push(data)
    })
  })
})

Version data entries

43 entries across 42 versions & 15 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.18.0 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.18.2 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.16.1 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.15.2 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.18.4 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.18.1 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.14.0 test/dummy/node_modules/stream-http/test/browser/cookie.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/stream-http/test/browser/cookie.js
tang-0.2.1 spec/tang_app/node_modules/stream-http/test/browser/cookie.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/stream-http/test/browser/cookie.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/stream-http/test/browser/cookie.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/stream-http/test/browser/cookie.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/stream-http/test/browser/cookie.js
tang-0.2.0 spec/tang_app/node_modules/stream-http/test/browser/cookie.js
tang-0.1.0 spec/tang_app/node_modules/stream-http/test/browser/cookie.js
tang-0.0.9 spec/tang_app/node_modules/stream-http/test/browser/cookie.js
enju_library-0.3.8 spec/dummy/node_modules/stream-http/test/browser/cookie.js
ilog-0.4.1 node_modules/stream-http/test/browser/cookie.js