{"id":19019009,"url":"https://github.com/elo7/ajax-amd","last_synced_at":"2025-04-23T04:44:55.958Z","repository":{"id":33990534,"uuid":"37743053","full_name":"elo7/ajax-amd","owner":"elo7","description":"Ajax.js is a library that helps ajax request. This library uses amd structure.","archived":false,"fork":false,"pushed_at":"2024-08-14T16:52:37.000Z","size":233,"stargazers_count":2,"open_issues_count":18,"forks_count":1,"subscribers_count":94,"default_branch":"master","last_synced_at":"2025-04-17T20:38:38.027Z","etag":null,"topics":["ajax","amd","front-end","javascript","lib","martell","nymeros"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elo7.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-06-19T19:59:29.000Z","updated_at":"2021-02-01T14:23:55.000Z","dependencies_parsed_at":"2025-04-17T08:55:37.348Z","dependency_job_id":"f006ab90-c907-4736-8b9e-e2d742270cfc","html_url":"https://github.com/elo7/ajax-amd","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fajax-amd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fajax-amd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fajax-amd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fajax-amd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elo7","download_url":"https://codeload.github.com/elo7/ajax-amd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372933,"owners_count":21419722,"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":["ajax","amd","front-end","javascript","lib","martell","nymeros"],"created_at":"2024-11-08T20:10:30.855Z","updated_at":"2025-04-23T04:44:55.940Z","avatar_url":"https://github.com/elo7.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ajax-amd\n\n_Ajax-amd is an ajax library_\n\nAjax.js is a library that helps making ajax requests on modern (IE \u003e= 10) browsers. This library uses [amd](http://en.wikipedia.org/wiki/Asynchronous_module_definition) structure.\n\n[![Build Status](https://travis-ci.org/elo7/ajax-amd.svg?branch=master)](https://travis-ci.org/elo7/ajax-amd)\n\n## Install\n\nInstall with [NPM](http://npmjs.com): `npm install elo7-ajax-amd`\n\n## Dependency\n\nElo7-ajax-amd depends on an [amd](http://en.wikipedia.org/wiki/Asynchronous_module_definition) implementation. We suggest [async-define](https://github.com/elo7/async-define) implementation for dependency lookup.\nYou only need to install it with [NPM](http://npmjs.com) and load elo7-ajax-amd file on your page.\n\n## Methods\n\n#### get\n`.get(url, data [,callbacks] [,config])`\n\n###### Description:\nExecutes an ajax request using `get` http method.\n\n###### Sample:\n``` js\ndefine(['ajax'], function(ajax) {\n\tajax.get('http://domain.com/ajax', {\n\t\t'data': 'value'\n\t}, {\n\t\t'success': function(response [,xhr]) {\n\t\t\t// success callback\n\t\t},\n\t\t'error': function(response [,xhr]) {\n\t\t\t// error callback\n\t\t},\n\t\t'complete': function([xhr]) {\n\t\t\t// complete callback\n\t\t}\n\t}, {\n\t\tretries: 1,     // number of retries\n\t\ttimeout: 1000,  // timeout in ms\n\t\tasync: true    // asynchronous\n\t});\n});\n```\n\n#### post\n`.post(url, data [,callbacks] [,config])`\n\n###### Description:\nExecutes an ajax request using `post` http method.\n\n###### Sample:\n``` js\ndefine(['ajax'], function(ajax) {\n\tajax.post('http://domain.com/ajax', {\n\t\t'data': 'value'\n\t}, {\n\t\t'success': function(response [,xhr]) {\n\t\t\t// success callback\n\t\t},\n\t\t'error': function(response [,xhr]) {\n\t\t\t// error callback\n\t\t},\n\t\t'complete': function([xhr]) {\n\t\t\t// complete callback\n\t\t}\n\t}, {\n\t\tretries: 1,     // number of retries\n\t\ttimeout: 1000,  // timeout in ms\n\t\tasync: true    // asynchronous\n\t});\n});\n```\n\n#### put\n`.put(url, data [,callbacks] [,config])`\n\n###### Description:\nExecutes an ajax request using `put` http method.\n\n#### delete\n`.delete(url, data [,callbacks] [,config])`\n\n###### Description:\nExecutes an ajax request using `delete` http method.\n\n#### serializeObject\n`.serializeObject(form)`\n\n###### Description:\nSerializes form fields to json. It can be used as data to the ajax function.\n\n###### Sample:\n``` js\ndefine(['ajax'], function(ajax) {\n\tvar serializedForm = ajax.serializeObject(document.querySelector('form'));\n});\n```\n\n\n## License\n\nElo7-ajax-amd is released under the [BSD](https://github.com/elo7/ajax-amd/blob/master/LICENSE). Have at it.\n\n* * *\n\nCopyright :copyright: 2017 Elo7\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felo7%2Fajax-amd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felo7%2Fajax-amd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felo7%2Fajax-amd/lists"}