{"id":15639913,"url":"https://github.com/magicdawn/superagent-charset","last_synced_at":"2025-08-20T14:32:02.726Z","repository":{"id":25864252,"uuid":"29304164","full_name":"magicdawn/superagent-charset","owner":"magicdawn","description":"add charset support for node's superagent","archived":false,"fork":false,"pushed_at":"2021-10-18T14:51:49.000Z","size":38,"stargazers_count":84,"open_issues_count":4,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-10T02:10:37.053Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicdawn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-15T15:40:13.000Z","updated_at":"2022-11-26T15:54:28.000Z","dependencies_parsed_at":"2022-08-27T10:42:27.767Z","dependency_job_id":null,"html_url":"https://github.com/magicdawn/superagent-charset","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fsuperagent-charset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fsuperagent-charset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fsuperagent-charset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicdawn%2Fsuperagent-charset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicdawn","download_url":"https://codeload.github.com/magicdawn/superagent-charset/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230431103,"owners_count":18224655,"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":[],"created_at":"2024-10-03T11:28:12.945Z","updated_at":"2024-12-19T12:10:37.610Z","avatar_url":"https://github.com/magicdawn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# superagent-charset\n\n\u003e add charset support for node's superagent\n\n[![Build Status](https://img.shields.io/travis/magicdawn/superagent-charset.svg?style=flat-square)](https://travis-ci.org/magicdawn/superagent-charset)\n[![Coverage Status](https://img.shields.io/codecov/c/github/magicdawn/superagent-charset.svg?style=flat-square)](https://codecov.io/gh/magicdawn/superagent-charset)\n[![npm version](https://img.shields.io/npm/v/superagent-charset.svg?style=flat-square)](https://www.npmjs.com/package/superagent-charset)\n[![npm downloads](https://img.shields.io/npm/dm/superagent-charset.svg?style=flat-square)](https://www.npmjs.com/package/superagent-charset)\n[![npm license](https://img.shields.io/npm/l/superagent-charset.svg?style=flat-square)](http://magicdawn.mit-license.org)\n[![Greenkeeper badge](https://badges.greenkeeper.io/magicdawn/superagent-charset.svg)](https://greenkeeper.io/)\n\n\n## Install\n```js\n$ npm i superagent-charset --save\n```\n\n## API\n\n### install\n\n```js\nconst request = require('superagent')\nrequire('superagent-charset')(request)\n```\n\nthis will add `request.Request.prototype.charset`\n\n### charset\n\n`.charset(encoding)` , will passed to [iconv-lite](https://github.com/ashtuchkin/iconv-lite)\n\n```js\nconst should = require('should')\nconst request = require('superagent')\nrequire('superagent-charset')(request) // install charset\n\ndescribe('Basic Test', function() {\n  it('it works', function(done) {\n    request.get('http://www.sohu.com/')\n      .charset('gbk')\n      .end((err, res) =\u003e {\n        res.text.should.match(/搜狐/)\n        done(err)\n      })\n  })\n})\n```\n\n## License\nthe MIT License, http://magicdawn.mit-license.org","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdawn%2Fsuperagent-charset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicdawn%2Fsuperagent-charset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicdawn%2Fsuperagent-charset/lists"}