{"id":23914816,"url":"https://github.com/mahmudunnabikajal/datatable-axios","last_synced_at":"2026-06-23T09:31:20.826Z","repository":{"id":189702969,"uuid":"678771259","full_name":"mahmudunnabikajal/datatable-axios","owner":"mahmudunnabikajal","description":"Datatable Axios is a simple and convenient npm package that helps you make GET, POST, and PUT requests with ease, while handling search parameters and pagination seamlessly for ssr datatable. It's built on top of the popular Axios library, making it reliable and efficient for your data fetching needs.","archived":false,"fork":false,"pushed_at":"2023-09-20T09:18:19.000Z","size":201,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T17:47:23.636Z","etag":null,"topics":["datatable","datatable-api","datatable-axios","datatable-serverside","datatable-vue","datatables-library","datatables-plugin","datatables-server-side-scripting","vue-datatable"],"latest_commit_sha":null,"homepage":"https://mahmudunnabikajal.github.io/datatable-axios/","language":"JavaScript","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/mahmudunnabikajal.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}},"created_at":"2023-08-15T10:40:56.000Z","updated_at":"2024-02-05T16:14:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"20aa275c-87fe-4dc1-90ed-e670058e4961","html_url":"https://github.com/mahmudunnabikajal/datatable-axios","commit_stats":null,"previous_names":["mahmudunnabikajal/datatable-axios"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mahmudunnabikajal/datatable-axios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudunnabikajal%2Fdatatable-axios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudunnabikajal%2Fdatatable-axios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudunnabikajal%2Fdatatable-axios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudunnabikajal%2Fdatatable-axios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmudunnabikajal","download_url":"https://codeload.github.com/mahmudunnabikajal/datatable-axios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmudunnabikajal%2Fdatatable-axios/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34684671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":["datatable","datatable-api","datatable-axios","datatable-serverside","datatable-vue","datatables-library","datatables-plugin","datatables-server-side-scripting","vue-datatable"],"created_at":"2025-01-05T10:28:29.246Z","updated_at":"2026-06-23T09:31:20.802Z","avatar_url":"https://github.com/mahmudunnabikajal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datatable Axios\n[![mahmudunnabikajal - datatable-axios](https://img.shields.io/static/v1?label=mahmudunnabikajal\u0026message=datatable-axios\u0026color=blue\u0026logo=github)](https://github.com/mahmudunnabikajal/datatable-axios \"Go to GitHub repo\")\n[![Latest Stable Version](https://img.shields.io/npm/v/datatable-axios.svg)](https://www.npmjs.com/package/datatable-axios)\n[![NPM Downloads](https://img.shields.io/npm/dt/datatable-axios.svg)](https://www.npmjs.com/package/datatable-axios)\n[![License](https://img.shields.io/badge/License-MIT-blue)](#license)\n[![Documentation](https://img.shields.io/badge/Documentation-blue)](https://mahmudunnabikajal.github.io/datatable-axios/ \"Go to project documentation\")\n\n\nDatatable Axios is a simple and convenient npm package that helps you make GET, POST, and PUT requests with ease, while handling search parameters and pagination seamlessly. It's built on top of the popular Axios library, making it reliable and efficient for your data fetching needs.\n\n\u0026nbsp;\n# Installation\nYou can install Datatable Axios using npm:\n\n```bash\nnpm install datatable-axios\n```\n\u0026nbsp;\n# Why Datatable Axios?\nSimplify your `HTTP calls without repetition`. Say goodbye to repeating steps for every datatable request!\n\n- **`Cons:`** Without using the library, you can achieve the same functionality in Axios which ***isn't readable \u0026 reusable***.\n```js\nconst response = await axios.get('http://example.com/api/v1/products?page=2\u0026paginate=25\u0026search=we');\nconsole.log(response.data);\n```\n- **`Pros:`** After using this library, you can achieve the same functionality of Axios in a ***readable \u0026 reusable way***\n```js\nconst response = await datatable.get('products');\nconsole.log(response.data);\n```\n\u0026nbsp;\n# Usage\nTo get started with Datatable Axios, follow these simple steps:\n\n- use global axios plugin setup in `axios.js` (optional)\n``` js\nimport axios from \"axios\"\n\n// Make the axios library globally available on the window object\nwindow.axios = axios\n// Set your base API URL for seamless requests\nwindow.axios.defaults.baseURL = \"http://example.com/api/v1/\"\n\n// Other configuration here\n```\n\n- Import the package at the top of your JavaScript file:\n\n```js\nimport datatable from 'datatable-axios'\n```\n- Initialize an instance of the Datatable class:\n\n```js\nconst datatable = new Datatable();\n```\n\u0026nbsp;\n# Use of API URL:\n\n- When you have a global `axios.js` configuration setting with baseURL, simplify calls API by using just the path:\n```js\nconst response = await datatable.get('products');\nconsole.log(response.data);\n```\n- If you're not utilizing a global `axios.js` configuration for with baseURL, include the full URL when making API calls:\n```js\nconst response = await datatable.get('http://example.com/api/v1/products');\nconsole.log(response.data);\n```\n\u0026nbsp;\n# Use of HTTP requests:\n\n- Perform a GET request:\n```js\nconst response = await datatable.get('url or path');\nconsole.log(response.data); // Display the fetched data\n```\n- Perform a POST request:\n```js\nconst response = await datatable.post('url or path');\nconsole.log(response.data); // Display the response data\n```\n- Perform a PUT request:\n```js\nconst response = await datatable.put('url or path');\nconsole.log(response.data); // Display the updated data\n```\n\u0026nbsp;\n# Example of HTTP call:\n- Example 1 : \n```js\ndatatable.get('http://example.com/api/v1/products')\n  .then(response =\u003e {\n    console.log(\"Data fetched successfully:\", response.data);\n  })\n  .catch(error =\u003e {\n    console.error(\"An error occurred:\", error);\n  });\n```\n- Example 2 : \n```js\ntry {\n  const response = await datatable.get('/api/v1/products');\n  console.log(\"Data fetched successfully:\", response.data);\n} catch (error) {\n  console.error(\"An error occurred:\", error);\n}\n```\n**`Note:`** Similar usage for POST and PUT requests\n\u003c!-- # Advanced Usage\nYou can also pass search parameters, pagination, and search queries to your requests:\n\n```js\n// Append search parameters to the URL\nconst response = await datatable.get('https://api.example.com/data', {\n  page: 1,\n  paginate: 10,\n  search: 'keyword',\n});\nconsole.log(response.data);\n``` --\u003e\n\n\u0026nbsp;\n# Contributing\nWe welcome contributions to enhance Datatable Axios! Feel free to open issues for bug reports or feature requests. If you'd like to contribute code, please fork the repository, make your changes, and submit a pull request.\n\n\u0026nbsp;\n# License\nReleased under [MIT License](LICENSE) by [@mahmudunnabikajal](https://github.com/mahmudunnabikajal).\n\n\u0026nbsp;\n# Author\nMahmudun Nabi Kajal\u003cbr /\u003e\nContact:  [Linkedin](https://www.linkedin.com/in/mahmudun-nabi-kajal/), [GitHub](https://github.com/mahmudunnabikajal), [Gmail](mailto:mahmudunnabikajal), [Website](http://mahmudunnabikajal.com/)\n\nFeel free to reach out to me for any questions or feedback! I hope Datatable Axios simplifies your data fetching process for your datatable.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmudunnabikajal%2Fdatatable-axios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmudunnabikajal%2Fdatatable-axios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmudunnabikajal%2Fdatatable-axios/lists"}