Skip to content

用户

查询用户信息。

const TOKEN = '123456';

const url = 'https://api.cnb.cool/user';
const options = {method: 'GET', headers: {Authorization: 'Bearer ' + TOKEN}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}

联系 math@baima.site