# ajax-promise-in-browser

> ajax promise, browser support promise. 浏览器支持promise的ajax

Latest version **1.1.1** (published 2016-09-29) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ajax-promise-in-browser
pnpm add ajax-promise-in-browser
yarn add ajax-promise-in-browser
bun add ajax-promise-in-browser
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2016-09-29 |
| First published | 2016-09-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | edwardzzz@foxmail.com |
| Maintainers | edwwardzzz |
| Keywords | ajax, promise, ajax-promise |

## Links

- npm: https://www.npmjs.com/package/ajax-promise-in-browser
- Repository: https://github.com/EdwardZZZ/npm
- Homepage: https://github.com/EdwardZZZ/npm#readme
- Issues: https://github.com/EdwardZZZ/npm/issues
- npm.io page: https://npm.io/package/ajax-promise-in-browser

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-09-29
- 1.1.0 — 2016-09-29
- 1.0.8 — 2016-09-29
- 1.0.6 — 2016-09-29
- 1.0.5 — 2016-09-29
- 1.0.4 — 2016-09-29
- 1.0.3 — 2016-09-29
- 1.0.2 — 2016-09-29
- 1.0.1 — 2016-09-29
- 1.0.0 — 2016-09-29
- 0.0.1 — 2016-09-22

## README

#Description

A ajax base promise, browser supports promise.

browse don't supports promise use <https://www.npmjs.com/package/ajax-promise-simple>


一个浏览器支持promise的ajax

浏览器不支持promise的请使用<https://www.npmjs.com/package/ajax-promise-simple>


#Usage 用法
```javascipt
var ajaxPromise = require('ajax-promise-simple')

/**
    有四个属性方法：
    ajaxPromise.get => return text
    ajaxPromise.getJSON  => return JSON
    ajaxPromise.post => return text
    ajaxPromise.postJSON  => return JSON
*/

ajaxPromise[get|getJSON|post|postJSON](url, params)
.then(function(data){
})
.catch(function(error){
})
```

###ES5
```javascipt
var ajax = require('ajax-promise-in-browser')

ajax.get('http://***/login', 
    {username:aaa, password:123456})
.then(function(data){
})
.catch(function(error){

})
```

###ES6
```javascipt
ajax.post('http://***/login', 
    {username:aaa, password:123456})
.then((data) => {
})
.catch((error) => {

})

---
_Source: https://npm.io/package/ajax-promise-in-browser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
