           json: true
         quest options, (err, resp, body) ->
           assert not err, "Has error #{err}"
-          assert.equal resp.statusCode, 200, "Status code should be 200, is #{resp.statusCode}"
-          assert.equal body.url, "http://httpbin.org/get"
+          assert.equal resp?.statusCode, 200, "Status code should be 200, is #{resp?.statusCode}"
+          assert.equal body?.url, "http://httpbin.org/get"
           done safe_err err
 
       it "doesn't follow relative redirects when disabled", (done) ->

          followRedirects: false
        quest options, (err, resp, body) ->
          assert not err, "Has error #{err}"
          assert.equal resp.statusCode, 302, "Status code should be 302, is #{resp.statusCode}"
          # As far as I can tell this isn't actually a relative redirect...
          assert.equal resp.headers.location, 'http://httpbin.org/relative-redirect/2'
          done safe_err err

      it 'follows relative redirects', (done) ->

            'user-agent': other_user_agent
        quest options, (err, resp, body) ->
          assert not err, "Has error #{err}"
          assert.equal resp?.statusCode, 200, "Status code should be 200, is #{resp?.statusCode}"
          assert.equal body?['user-agent'], other_user_agent
          done safe_err err

      it 'allows you to set a querystring parameter', (done) ->
