{"id":23581084,"url":"https://github.com/mmf-fe/weex-http","last_synced_at":"2025-05-06T21:06:29.846Z","repository":{"id":57397601,"uuid":"83118973","full_name":"MMF-FE/weex-http","owner":"MMF-FE","description":"weex simple http lib","archived":false,"fork":false,"pushed_at":"2017-05-15T03:32:35.000Z","size":55,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-06T21:06:21.961Z","etag":null,"topics":["http","weex"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MMF-FE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-25T08:44:51.000Z","updated_at":"2018-07-04T14:37:58.000Z","dependencies_parsed_at":"2022-08-31T15:10:58.243Z","dependency_job_id":null,"html_url":"https://github.com/MMF-FE/weex-http","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fweex-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fweex-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fweex-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMF-FE%2Fweex-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MMF-FE","download_url":"https://codeload.github.com/MMF-FE/weex-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769397,"owners_count":21801377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","weex"],"created_at":"2024-12-27T00:14:09.758Z","updated_at":"2025-05-06T21:06:29.826Z","avatar_url":"https://github.com/MMF-FE.png","language":"TypeScript","readme":"# weex-http\nweex simple http lib\n\n[![Build Status](https://img.shields.io/travis/MMF-FE/weex-http.svg?style=flat-square)](https://travis-ci.org/MMF-FE/weex-http) \n[![Coverage Status](https://img.shields.io/coveralls/MMF-FE/weex-http.svg?style=flat-square)](https://coveralls.io/r/MMF-FE/weex-http?branch=master)\n\n## Installing\n\n```\nnpm i weex-http --save-dev\n# or\nyarn add weex-http --dev\n```\n\n## Example\n\nPerforming a GET request\n\n```js\nimport weexHttp from 'weex-http'\n\nweexHttp.get('/user', {\n    ID: 12345\n})\n.then(function (response) {\n    console.log(response)\n})\n.catch(function (error) {\n    console.log(error)\n})\n```\n\nPerforming a POST request\n\n```js\nweexHttp.post('/user', {\n    firstName: 'Fred',\n    lastName: 'Flintstone'\n})\n.then(function (response) {\n    console.log(response);\n})\n.catch(function (error) {\n    console.log(error);\n})\n```\n\n## Creating an instance\n\nYou can create a new instance of axios with a custom config.\n\nweexHttp.create([config])\n\n```js\nvar instance = weexHttp.create({\n    baseURL: 'https://some-domain.com/api/',\n    timeout: 1000,\n    headers: {'X-Custom-Header': 'foobar'}\n})\n```\n\n## Options\n\n- timeout number `default: 10000` ms\n- headers any `default: {}`\n- transformRequest Function[] `default: []` \n- transformHeaders Function[] `default: []` \n- transformResponse Function[] `default: []` \n\n## Instance methods\n\nThe available instance methods are listed below. The specified config will be merged with the instance config.\n\nweexHttp#get(url[, data[, config]])\n\nweexHttp#delete(url[, data[, config]])\n\nweexHttp#head(url[, data[, config]])\n\nweexHttp#post(url[, data[, config]])\n\nweexHttp#put(url[, data[, config]])\n\nweexHttp#patch(url[, data[, config]])\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmf-fe%2Fweex-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmf-fe%2Fweex-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmf-fe%2Fweex-http/lists"}