Skip to content

fetch/ajax #96

@et-hh

Description

@et-hh

ajax

  • XMLHTTPRequest对象实例的应用,api相比fetch更多
  • 基于回调方式,易出现回调地狱

fetch

  • 基于promise,可以结合async/await
  • 默认不携带cookie,要设置credentials: 'include'
  • window的原生方法
  • 所有版本ie都不支持fetch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions