{"id":22916450,"url":"https://github.com/shaching/okconnect","last_synced_at":"2025-04-01T12:43:46.386Z","repository":{"id":57314013,"uuid":"110444390","full_name":"shaching/okConnect","owner":"shaching","description":"Http CRUD ( GET, POST, PUT, DELETE, PATCH ) Operation in ES6.","archived":false,"fork":false,"pushed_at":"2021-02-25T18:20:18.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T09:17:23.286Z","etag":null,"topics":["axios","es6","fetch","http","javascript","node","npm","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shaching.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-11-12T15:33:56.000Z","updated_at":"2021-02-25T18:20:20.000Z","dependencies_parsed_at":"2022-09-20T23:21:41.460Z","dependency_job_id":null,"html_url":"https://github.com/shaching/okConnect","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/shaching%2FokConnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaching%2FokConnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaching%2FokConnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaching%2FokConnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaching","download_url":"https://codeload.github.com/shaching/okConnect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246642126,"owners_count":20810548,"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":["axios","es6","fetch","http","javascript","node","npm","yarn"],"created_at":"2024-12-14T06:12:54.911Z","updated_at":"2025-04-01T12:43:46.354Z","avatar_url":"https://github.com/shaching.png","language":"JavaScript","readme":"# okConnect\nA lightweight Http CRUD (GET, POST, PUT, DELETE, PATCH) Operation in ES6.\n\n## Install\n```\nyarn add okconnect\n```\n\n## Used with ES6 example.\n```javascript\nimport { HttpConnect, HttpHeader } from 'okconnect';\n\nexport default class Foo extends HttpConnect {\n  constructor() {\n    const httpHeader = new HttpHeader.Builder()\n      .setNoCacheControl()\n      .setJsonContentType()\n      .setXWwwFormUrlencodedContentType()\n      .setJwtAuthorization(jwt)\n      .build();\n\n    super(httpHeader.getHeader(), 'http://192.168.1.1/api/v1/');\n  }\n\n  booPost(jsonBody) {\n    return super.post('user/login', jsonBody);\n  }\n  \n  booGet(uid) {\n    return super.get(`user/${uid}`);\n  }\n  \n  booPut(jsonBody) {\n    return super.put('user/status', jsonBody);\n  }\n\n  booDelete(uid) {\n    return super.delete(`user/${uid}`);\n  }\n  \n  booPatch(jsonBody) {\n    return super.get('user/profile', jsonBody);\n  }\n}\n```\n\n## HttpHeader supported 4 usually cases. Moreover, you can inherit and expand features.\n```javascript\n\nsetNoCacheControl()\n\nsetJsonContentType()\n\nsetXWwwFormUrlencodedContentType()\n\nsetJwtAuthorization(jwt)\n\n```\n\n### License\n\nokConnect is released under the [Apache 2.0 license](LICENSE).\n\n```\nCopyright 2017 Johnny Chu\u003cchuhsun@gmail.com\u003e\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaching%2Fokconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaching%2Fokconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaching%2Fokconnect/lists"}