{"id":25694148,"url":"https://github.com/colorfulcompany/gas-http-client","last_synced_at":"2025-02-24T23:51:11.585Z","repository":{"id":57103456,"uuid":"96899012","full_name":"colorfulcompany/gas-http-client","owner":"colorfulcompany","description":"Google Apps Script向けのTestableでReasonableなHTTP Client","archived":false,"fork":false,"pushed_at":"2023-08-10T07:12:49.000Z","size":176,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T20:09:30.609Z","etag":null,"topics":["foundation","google-apps-script","gsuite","urlfetch"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colorfulcompany.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-07-11T13:56:03.000Z","updated_at":"2024-04-27T23:54:09.000Z","dependencies_parsed_at":"2023-02-12T01:31:00.394Z","dependency_job_id":null,"html_url":"https://github.com/colorfulcompany/gas-http-client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfulcompany%2Fgas-http-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfulcompany%2Fgas-http-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfulcompany%2Fgas-http-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfulcompany%2Fgas-http-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colorfulcompany","download_url":"https://codeload.github.com/colorfulcompany/gas-http-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240576461,"owners_count":19823293,"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":["foundation","google-apps-script","gsuite","urlfetch"],"created_at":"2025-02-24T23:51:10.992Z","updated_at":"2025-02-24T23:51:11.574Z","avatar_url":"https://github.com/colorfulcompany.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"GasHttpClient\n=============\n\nSimple Google Apps Script UrlFetchApp wrapper supporting message authentication with KaleoJWT\n\n[KaleoSoftware/KaleoJWT: Super simple, portable JWT implementation that supports only SHA256 algo](https://github.com/KaleoSoftware/KaleoJWT)\n\nfeature\n=======\n\n * request()\n * requestJSON()\n\nUsage\n=====\n\nPrepare\n-------\n\n 1. clone this repo\n 2. clasp init \u0026 clasp push\n 3. deploy this as Library and memo Library ID from Project settings\n 4. add Library with memoed ID from Script Editor\n\ncreate Reader from Apps Script Project\n--------------------------------------\n\n```javascript\nconst client = GasHttpClient.createClient(UrlFetchApp, 'https://example.com')\nclient.opts({\n  method:  'post',\n  payload: {\n    thank: 'you',\n    very:  'mutch',\n    exp:   new Date('2017-07-22').getTime()\n  },\n  withJWT: {\n    'secret':      'abc',\n    'headerField': 'X-GAS-JWT',\n  }\n})\n\nconst response = client.requestJSON('/post')\n```\n\nNote: `requestJSON()` add header `Accept: application/json` and `Content-Type: application/json` automatically.\n\nYou can use `opts()`, `headers()` and `buildParam()` or `buildParamJSON()` for tesing of building HTTP request, without deploying to Google Apps Script to do real HTTP request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolorfulcompany%2Fgas-http-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolorfulcompany%2Fgas-http-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolorfulcompany%2Fgas-http-client/lists"}