How to use the superagent.del function in superagent

To help you get started, we’ve selected a few superagent examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rorymadden / neoprene / test / node.js View on Github external
it('should remove an automated node index', function(done){
    var url = 'http://localhost:7475/db/data/schema/index/User/first';
    request
      .del(url)
      .end(function(res) {
        expect(res.status).to.be.equal(204);
        done();
      });
  });
  it('should remove a relationship index', function(done){
github rorymadden / neoprene / test / node.js View on Github external
it('should remove a relationship index', function(done){
    var url = 'http://localhost:7475/db/data/schema/index/likes/tip';
    request
      .del(url)
      .end(function(res) {
        expect(res.status).to.be.equal(204);
        done();
      });
  });
});
github vpdb / server / src / app / roms / rom.api.acl.spec.js View on Github external
it('should deny access to rom deletion', function(done) {
			request.del('/api/v1/roms/1234').as('member').end(hlp.status(403, done));
		});
github netbeast / dashboard / lib / stop.js View on Github external
module.exports = function (app) {
  console.log('Stopping app' + app + '...')

  var url = 'http://' + 'localhost' + ':' + '8000' + '/api/activities/' + app
  request.del(url, function (err, resp, body) {
    if (err) throw err
    console.log('%s responded code %s\n%s', url, resp.statusCode, body)
  })
}
github vpdb / server / src / app / game-requests / game.request.api.spec.js View on Github external
it('should fail if the game request does not exist', function(done) {
			request.del('/api/v1/game_requests/1234').as('moderator').end(hlp.status(404, 'no such game request', done));
		});
github vpdb / server / src / app / builds / build.api.spec.js View on Github external
hlp.release.createRelease('member', request, { buildId: res.body.id }, () => {
						request
							.del('/api/v1/builds/' + res.body.id)
							.as('member')
							.end(hlp.status(400, 'Cannot delete referenced build', done));
					});
				});
github keenlabs / KeenClient-Node / index.js View on Github external
del: function(apiKey, path, callback) {
			rest
				.del(baseUrl + apiVersion + path)
				.set('Authorization', apiKey)
				.set('Content-Length', 0)
				.end(function(err, res) {
					processResponse(err, res, callback);
				});
		}
	};
github rbglass / chandelier / src / js / api / JobsAPI.js View on Github external
export function deleteSingleProduct(productId) {
	SharedActionCreators.startLoading();
	request.del(`${products}/${productId}`)
					.end(onReply(ServerActionCreators.deleteSingleProduct, productId));
}
github kelvinr / React-Todo / frontend / js / actions / listActions.js View on Github external
return dispatch => {
    request.del(`${ROOT}/todo_lists/${id}`)
      .set('Accept', 'application/json')
      .end((error, res) => {
        if (res) {
          dispatch(deletedList(res.body))
        }
      });
  }
};
github modella / modella / lib / sync.js View on Github external
exports.removeAll = function(fn) {
  var url = this.url('all');
  request.del(url, function(res) {
    fn(res.error, res.body);
  });
};