{"id":15569436,"url":"https://github.com/dwolfhub/corona_httprequest","last_synced_at":"2026-04-27T02:33:09.103Z","repository":{"id":9551490,"uuid":"11458843","full_name":"dwolfhub/corona_httprequest","owner":"dwolfhub","description":"send http requests and provide callbacks for success and failure of request","archived":false,"fork":false,"pushed_at":"2013-07-16T20:21:09.000Z","size":124,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T06:44:08.172Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwolfhub.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":"2013-07-16T19:59:33.000Z","updated_at":"2013-07-16T20:21:10.000Z","dependencies_parsed_at":"2022-09-24T04:01:32.708Z","dependency_job_id":null,"html_url":"https://github.com/dwolfhub/corona_httprequest","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/dwolfhub%2Fcorona_httprequest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fcorona_httprequest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fcorona_httprequest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwolfhub%2Fcorona_httprequest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwolfhub","download_url":"https://codeload.github.com/dwolfhub/corona_httprequest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243223875,"owners_count":20256594,"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-02T17:28:46.995Z","updated_at":"2025-12-26T02:53:24.919Z","avatar_url":"https://github.com/dwolfhub.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP Request Library\n\n#### File Name\nrequesthttp.lua\n\n#### Note\n\nThe HTTP request is asynchronous and therefore callback functions must be entered in order to process the data when it comes back.\n\nThe onError callback is run when the flag isError that comes back with the request is marked true. Status codes are ignored. If you need to consider a 404 status code an error for example, place that logic in your onSuccess callback function.\n\n## RequestHttp:send(endPoint, method, queryString, onSuccess, onError)\n\n#### Parameters\n\u003e - endPoint (string) the URL that the request should go to\n\u003e - method (string) the method of the request\n\u003e - header (table)\n\u003e - queryString (string) the query string of data to send with the request\n\u003e - onSuccess (func) function to run when the request is successful\n\u003e - onError (func) function to run when the request is successful\n\n#### Return\n\u003e void\n\n### Example \n```lua\nlocal endPoint = 'https://www.API.com'\nlocal method = \"POST\"\nlocal header = {\n    [\"X-API-KEY\"] = \"AAAAAAAAAAAAAAAAAAA\"\n}\nlocal queryString = \"field1=foo\u0026field2=bar\"\nlocal onSuccess = function (returnData)\n    print('onSuccess Processed')\nend\nlocal onError = function (returnData)\n    print('onError processed')\nend\n\nlocal requestHttp = require \"library.core.http.requesthttp\"\nrequestHttp.send(endPoint, method, header, queryString, onSuccess, onError)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fcorona_httprequest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwolfhub%2Fcorona_httprequest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwolfhub%2Fcorona_httprequest/lists"}