{"id":19475252,"url":"https://github.com/yunisdev/ajaxsimpler","last_synced_at":"2025-09-13T13:38:15.843Z","repository":{"id":57175131,"uuid":"348712799","full_name":"yunisdev/AjaxSimpler","owner":"yunisdev","description":"Simplified AJAX syntax","archived":false,"fork":false,"pushed_at":"2021-04-01T09:50:14.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-05T11:34:32.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/yunisdev.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":"2021-03-17T13:05:25.000Z","updated_at":"2021-04-01T09:50:17.000Z","dependencies_parsed_at":"2022-09-03T08:51:55.523Z","dependency_job_id":null,"html_url":"https://github.com/yunisdev/AjaxSimpler","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/yunisdev/AjaxSimpler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunisdev%2FAjaxSimpler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunisdev%2FAjaxSimpler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunisdev%2FAjaxSimpler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunisdev%2FAjaxSimpler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunisdev","download_url":"https://codeload.github.com/yunisdev/AjaxSimpler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunisdev%2FAjaxSimpler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274970217,"owners_count":25383138,"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-09-13T02:00:10.085Z","response_time":70,"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":[],"created_at":"2024-11-10T19:31:17.493Z","updated_at":"2025-09-13T13:38:15.788Z","avatar_url":"https://github.com/yunisdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AjaxSimplier\n\n### Installation\n\nInstall with npm:\n\n```bash\n$ npm i ajaxsimpler\n```\n\nOr, use from unpkg.com:\n\n```html\n\u003cscript src=\"https://unpkg.com/ajaxsimpler\"\u003e\u003c/script\u003e\n```\n\nYou also need to add Jquery (for AJAX) before ajaxsimpler. So, you can use this imports for HTML file:\n\n```html\n\u003cscript src=\"https://unpkg.com/jquery\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/ajaxsimpler\"\u003e\u003c/script\u003e\n```\n\n### Usage\n\n#### Creating object and setup\n\nTo use Ajax Simpler, you must create object first:\n\n```js\nvar ajx = window.AjaxSimpler.create();\n```\n\nIf you are using a backend application, ex. Django, you will need to add CSRF token. For adding CSRF token, you can add:\n\n```js\najx.csrftoken = \"csrftoken\";\n```\n\nFor example, if your app has CSRF token in cookie with different name you should use:\n\n```js\najx.csrftoken = \"COOKIE_NAME\";\n```\n\nAlso for shorthand, you can add CSRF token when creating object:\n\n```js\nvar ajx = window.AjaxSimpler.create({ csrftoken: \"csrftoken\" });\n```\n\nFor adding default headers, you can use:\n\n```js\najx.addDefaultHeader(\"Content-Type\", \"application/json\");\n```\n\nFor deleting default header:\n\n```js\najx.deleteDefaultHeader(\"Content-Type\");\n```\n\n#### Requests\n\nFor `GET` request you can use:\n\n```js\najx.GET(\"URL_HERE\").then((result) =\u003e console.log(result));\n```\n\n`AjaxSimpler.GET` returns Promise object. Accepts, 3 parameters:\n\n-   `url` (required)\n    URL to request.\n-   `data`\n    Data to send as url parameter.\n-   `header`\n    Headers for request.\n\nFor `POST` request you can use:\n\n```js\najx.POST(\"URL_HERE\").then((result) =\u003e console.log(result));\n```\n`AjaxSimpler.POST` returns Promise object. Accepts, 3 parameters:\n\n-   `url` (required)\n    URL to request.\n-   `data`\n    Data to send as request body.\n-   `header`\n    Headers for request.\n\n##### Thanks for using AjaxSimpler","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunisdev%2Fajaxsimpler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunisdev%2Fajaxsimpler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunisdev%2Fajaxsimpler/lists"}