---
title: "NUXT_E3001"
description: "useFetch 请求 URL 以 \"//\" 开头。"
canonical_url: "https://nuxt.zhcndoc.com/docs/4.x/errors/e3001"
---
# E3001

传递给 `useFetch()` 的 URL 以 `//` 开头。像这样的协议相对 URL 会解析到外部主机，这几乎从不是预期行为，因此会被拒绝，以避免将请求泄漏到不同的源。

## 分辨率

使用带有显式协议的绝对 URL，或使用相对路径：

```ts
useFetch('/api/data')
useFetch('https://api.example.com/data')
```

::read-more{to="https://nuxt.zhcndoc.com/docs/4.x/api/composables/use-fetch"}
::


## Sitemap

See the full [sitemap](https://nuxt.zhcndoc.com/sitemap.md) for all pages.
