{"id":23508624,"url":"https://github.com/poseidoncoder/pls","last_synced_at":"2025-08-10T15:18:21.905Z","repository":{"id":57137701,"uuid":"299104376","full_name":"PoseidonCoder/pls","owner":"PoseidonCoder","description":"😵 dead simple requests","archived":false,"fork":false,"pushed_at":"2021-02-23T18:26:57.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T01:19:56.105Z","etag":null,"topics":["ajax","simple","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PoseidonCoder.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":"2020-09-27T19:30:30.000Z","updated_at":"2021-04-16T17:36:25.000Z","dependencies_parsed_at":"2022-09-01T03:01:23.085Z","dependency_job_id":null,"html_url":"https://github.com/PoseidonCoder/pls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PoseidonCoder/pls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoseidonCoder%2Fpls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoseidonCoder%2Fpls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoseidonCoder%2Fpls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoseidonCoder%2Fpls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PoseidonCoder","download_url":"https://codeload.github.com/PoseidonCoder/pls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoseidonCoder%2Fpls/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269740697,"owners_count":24467829,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ajax","simple","typescript"],"created_at":"2024-12-25T11:24:24.500Z","updated_at":"2025-08-10T15:18:21.882Z","avatar_url":"https://github.com/PoseidonCoder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n\n# pls - makes requests simple\n\n\u003c/div\u003e\n\n## What is this?\npls is an asynchronous, simple, [promise](https://developer.mozilla.org/enUS/docs/Web/JavaScript/Reference/Global_Objects/Promise)-based HTTP request API\n\n## examples\n\n### GET request\n```js\nconst pls = require(\"pls\")\npls.get(\"https://jsonplaceholder.typicode.com/todos/1\")\n    .then(response=\u003e response.parse()) // returns reponse promise\n    .then(body=\u003e console.log(body)) // prints response to console\n    .catch(error=\u003e console.log(error)) // log error if there is an error\n```\n\n### POST request\n```js\nconst pls = require(\"pls\")\npls.post(\"https://jsonplaceholder.typicode.com/posts\", \"Hello World!\", {\"Content-type\": \"text/plain\"})\n    .then(response =\u003e response.parse()) // returns reponse promise\n    .then(body =\u003e console.log(body)) // prints response to console\n    .catch(error =\u003e console.log(error)) // log error if there is an error\n```\n## methods \n\n### pls\n\n```ts\npls.get(endpoint: string): Promise\u003cResponse\u003e\n```\n\n```ts\npls.post(endpoint: string, payload: any, headers: http.OutgoingHttpHeaders): Promise\u003cResponse\u003e\n```\n\n### Response\n\n```ts\nResponse.parse(): Promise\u003cany\u003e\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposeidoncoder%2Fpls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposeidoncoder%2Fpls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposeidoncoder%2Fpls/lists"}