How to use the head function from superagent

Find comprehensive JavaScript superagent.head code examples handpicked from public code repositorys.

61
62
63
64
65
66
67
68
69
}

function onSuccess(videoData) {
  var path = videoData.video;
  console.log(`Got metadata about ${path}`);
  // const response = await superagent.head(path);
  // var total = response.headers["content-length"];
  var total = videoData.contentLength;
  console.log(`Got file length ${total}`);
fork icon0
star icon0
watch icon0