logo
  • 教程列表
  • SO官方文檔
  • 取
    • 獲取 JSON 資料
    • 設定請求標頭
    • 釋出資料
    • GlobalFetch
    • 傳送 cookies
    • 使用 Fetch 從 Stack Overflow API 中顯示問題
  1. StackOverflow 文件
  2. JavaScript 教程
  3. 取
  4. 設定請求標頭

設定請求標頭

Created: November-22, 2018

fetch('/example.json', {
    headers: new Headers({
        'Accept': 'text/plain',
        'X-Your-Custom-Header': 'example value'
    })
});
  • 釋出資料
  • 獲取 JSON 資料

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明