Skip to content

afeiship/next-url-status

Repository files navigation

next-url-status

Detect url status code for next.

version license size download

installation

npm install -S @jswork/next-url-status

usage

import '@jswork/next-url-status';

const url = 'https://www.baidu.com/index.html';

nx.urlStatus(url).then((res) => {
  console.log(res);
});

// failed : { code: -1 }
// success: { code: 200 }

license

Code released under the MIT license.