# t-http

> t-http

Latest version **1.0.6** (published 2024-01-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install t-http
pnpm add t-http
yarn add t-http
bun add t-http
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2024-01-23 |
| First published | 2024-01-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.8 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | the.one |
| Maintainers | the.one |
| Keywords | t-http, http, https, api, axios |

## Links

- npm: https://www.npmjs.com/package/t-http
- Issues: https://github.com/issues
- npm.io page: https://npm.io/package/t-http

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [element-ui](https://npm.io/package/element-ui.md) ^2.15.9
- [vue-cookie](https://npm.io/package/vue-cookie.md) ^1.1.4

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2024-01-23
- 1.0.5 — 2024-01-23

## README

# t-http

## Project setup
```
npm install t-http --save-dev;
or
yarn install t-http --save-dev;
```

### Syntax
```
t = new Date().valueOf();

GET:
    params: 
        type: Object
    exp: 
        { page: 1, size: 10 }
        /api/demo?page=1&size=10&t=t

GETQUERY:
    params: 
        type: Object
    exp: 
        { page: 1, size: 10 }
        /api/demo/1/10?t=t

POST:
    params: 
        type: Object
    exp: 
        { page: 1, size: 10 }
        /api/demo?t=t

PUT:
    params: 
        type: Object
    exp: 
        { page: 1, size: 10 }
        /api/demo?t=t

DELETE:
    params: 
        type: Object
    exp: 
        { page: 1, size: 10 }
        /api/demo?t=t

```
### Cite
```
mkdir demo.js

import apiFactory from 't-http';

const demo = [
    {
        name: 'demoList',
        url: '/demo/list',
        method: 'post'
    }
];

export default apiFactory(demo);
```
### Employ
```
import demoApi from '***/demo.js';
let params = { page: 1, size: 10 };
let { data, code } = await demoApi.demoList(params);
if(code === 0){
    //  To Do Somethings
}
```


### Customize configuration
See  [API](https://www.npmjs.com/package/t-http).

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