{"_path":"/components/avanda-js/client","_draft":false,"_partial":false,"_empty":false,"title":"Request","description":"Avanda Json Graph Api is a Json based graph API built on top of javascript axios and nodejs, this library lets you communicate with the backend controllers and functions, it leverages avanda functions and  nested functions with soem extra options to help you make advance requests to the server.","excerpt":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"request"},"children":[{"type":"text","value":"Request"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Avanda Json Graph Api is a Json based graph API built on top of javascript axios and nodejs, this library lets you communicate with the backend controllers and functions, it leverages avanda "},{"type":"element","tag":"a","props":{"href":"/guide/controllersfunctions"},"children":[{"type":"text","value":"functions"}]},{"type":"text","value":" and  "},{"type":"element","tag":"a","props":{"href":"/guide/controllers#nested-functions"},"children":[{"type":"text","value":"nested functions"}]},{"type":"text","value":" with soem extra options to help you make advance requests to the server."}]},{"type":"element","tag":"h2","props":{"id":"installation"},"children":[{"type":"text","value":"Installation"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To install avanda client, you can use npm or yarn package manager"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"npm,yarn,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:npm":""},"children":[{"type":"element","tag":"code","props":{"code":"$ npm install @avanda/avandajs\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$ npm install @avanda/avandajs\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:yarn":""},"children":[{"type":"element","tag":"code","props":{"code":"$ yarn global add @avanda/avandajs\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$ yarn global add @avanda/avandajs\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"$ flutter pub add avanda\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"$ flutter pub add avanda\n"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"usage"},"children":[{"type":"text","value":"Usage"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To use avanda client, you need to import it in your project and configure your client"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"import Avanda from \"@avanda/avandajs\";\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import Avanda from \"@avanda/avandajs\";\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"import 'package:avanda/avanda.dart';\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"import 'package:avanda/avanda.dart';\n"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"configuring-avanda-client"},"children":[{"type":"text","value":"Configuring Avanda Client"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Avanda Client has a config method that lets you configure the client, There are two configurations, the first one is an avanda config and the second one is an axios config, the avanda config is the url of the server and the axios config is the axios config, you can read more about axios config "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/req_config","rel":["nofollow","noopener","noreferrer"],"target":"_blank"},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"h4","props":{"id":"avanda-config"},"children":[{"type":"text","value":"Avanda Config"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The avanda config is the configuration for the avanda client, it accepts the url of the server and optionally the url of the websocket server url, if you don't pass the websocket url, the client will use the same url as the server url"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAvandaConfig({\n    rootUrl: \"https://avanda-server-url\",\n    wsUrl? : \"https://avanda-web-socket-server-url\" // avanda uses the root url by default\n})\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Avanda.setAvandaConfig({\n    rootUrl: \"https://avanda-server-url\",\n    wsUrl? : \"https://avanda-web-socket-server-url\" // avanda uses the root url by default\n})\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAvandaConfig({\n    rootUrl: \"https://avanda-server-url\",\n    wsUrl? : \"https://avanda-web-socket-server-url\" // avanda uses the root url by default\n})\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Avanda.setAvandaConfig({\n    rootUrl: \"https://avanda-server-url\",\n    wsUrl? : \"https://avanda-web-socket-server-url\" // avanda uses the root url by default\n})\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"axios-config"},"children":[{"type":"text","value":"Axios Config"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The axios config is the configuration for the axios client, it accepts the axios config, you can read more about axios config "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/req_config","rel":["nofollow","noopener","noreferrer"],"target":"_blank"},"children":[{"type":"text","value":"here"}]},{"type":"text","value":", You can pass the bearer token in the axios config, the client will automatically add the bearer token to the request headers to authenticate the request."}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAxiosRequestConfig({\n    baseURL: \"BASE_URL\", // the base url of the server\n    withCredentials: true,\n})\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Avanda.setAxiosRequestConfig({\n    baseURL: \"BASE_URL\", // the base url of the server\n    withCredentials: true,\n})\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAxiosRequestConfig({\n    baseURL: \"BASE_URL\", // the base url of the server\n    withCredentials: true,\n})\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"Avanda.setAxiosRequestConfig({\n    baseURL: \"BASE_URL\", // the base url of the server\n    withCredentials: true,\n})\n"}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"making-requests"},"children":[{"type":"text","value":"Making Requests"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To make a request you need the controller name and the function name, and can be passed into the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"service"}]},{"type":"text","value":" method, in the form "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"text","value":",then the "},{"type":"element","tag":"a","props":{"href":"#request-methods"},"children":[{"type":"text","value":"request method"}]},{"type":"text","value":", You can optionally add more "},{"type":"element","tag":"a","props":{"href":"#request-options"},"children":[{"type":"text","value":"request options"}]}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"request-methods"},"children":[{"type":"text","value":"Request Methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"These are the methods you can use to make requests:"}]},{"type":"element","tag":"h4","props":{"id":"get"},"children":[{"type":"text","value":"get()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"get"}]},{"type":"text","value":" request to your avanda server"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"post"},"children":[{"type":"text","value":"post()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"post"}]},{"type":"text","value":" request to your avanda server, it accepts the post data as argument"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").post({key: \"value\"});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").post({key: \"value\"});\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").post({key: \"value\"})\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").post({key: \"value\"})\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"update"},"children":[{"type":"text","value":"update()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"update"}]},{"type":"text","value":" request to your avanda server, it accepts the update data as argument"}]},{"type":"element","tag":"h4","props":{"id":"delete"},"children":[{"type":"text","value":"delete()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"delete"}]},{"type":"text","value":" request to your avanda server, delete data can be as a query param "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"param"}]}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").delete().param({key: \"value\"});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").delete().param({key: \"value\"});\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":" await new Avanda.service(\"ControllerName/FunctionName\").delete().param({key: \"value\"});\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":" await new Avanda.service(\"ControllerName/FunctionName\").delete().param({key: \"value\"});\n"}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"request-options"},"children":[{"type":"text","value":"Request Options"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"These are the options you can optionally use to make requests:"}]},{"type":"element","tag":"h4","props":{"id":"fetch"},"children":[{"type":"text","value":"fetch()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to select the fields you want to fetch from the server, it accepts the fields as the first argument and the nested function request which a new instance of an avanda request as the second argument, the nested function request is optional, you can read more about nested functions "},{"type":"element","tag":"a","props":{"href":"/guide/controllers#nested-functions"},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\"field1\", \"field2\");\n\n// with nested function\nawait new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\"field1\", \"field2\");\n\n// with nested function\nawait new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"param"},"children":[{"type":"text","value":"param()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to add query params to your request, it accepts the query params as argument"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().param({key: \"value\"});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().param({key: \"value\"});\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().param({key: \"value\"});\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().param({key: \"value\"});\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"select"},"children":[{"type":"text","value":"select()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to select the fields you want to fetch from the server,It accepts the fields as the arguments, it is an alias of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"fetch"}]},{"type":"text","value":" method without a nested function request"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"selectall"},"children":[{"type":"text","value":"selectAll()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to select all the fields you want to fetch from the server,It works the same as the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"select"}]},{"type":"text","value":" method but it selects all the fields in the caseo of an array of objects"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n"}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"as"},"children":[{"type":"text","value":"as()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to rename the field name of the nested function request, it accepts the new field name as argument"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n"}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n"}]}]}]}]}]},{"type":"element","tag":"blockquote","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For options on the response object, see "},{"type":"element","tag":"a","props":{"href":"/avanda-js/response"},"children":[{"type":"text","value":"Response Client"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"h1","props":{"id":"request"},"children":[{"type":"text","value":"Request"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Avanda Json Graph Api is a Json based graph API built on top of javascript axios and nodejs, this library lets you communicate with the backend controllers and functions, it leverages avanda "},{"type":"element","tag":"a","props":{"href":"/guide/controllersfunctions"},"children":[{"type":"text","value":"functions"}]},{"type":"text","value":" and  "},{"type":"element","tag":"a","props":{"href":"/guide/controllers#nested-functions"},"children":[{"type":"text","value":"nested functions"}]},{"type":"text","value":" with soem extra options to help you make advance requests to the server."}]},{"type":"element","tag":"h2","props":{"id":"installation"},"children":[{"type":"text","value":"Installation"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To install avanda client, you can use npm or yarn package manager"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"npm,yarn,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:npm":""},"children":[{"type":"element","tag":"code","props":{"code":"$ npm install @avanda/avandajs\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"$ npm install @avanda/avandajs"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:yarn":""},"children":[{"type":"element","tag":"code","props":{"code":"$ yarn global add @avanda/avandajs\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"$ yarn global add @avanda/avandajs"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"$ flutter pub add avanda\n","language":"bash"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"$ flutter pub add avanda"}]}]}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"usage"},"children":[{"type":"text","value":"Usage"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To use avanda client, you need to import it in your project and configure your client"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"import Avanda from \"@avanda/avandajs\";\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"@avanda/avandajs"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":";"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"import 'package:avanda/avanda.dart';\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"'"}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"package:avanda/avanda.dart"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"'"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":";"}]}]}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"configuring-avanda-client"},"children":[{"type":"text","value":"Configuring Avanda Client"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Avanda Client has a config method that lets you configure the client, There are two configurations, the first one is an avanda config and the second one is an axios config, the avanda config is the url of the server and the axios config is the axios config, you can read more about axios config "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/req_config","rel":["nofollow","noopener","noreferrer"],"target":"_blank"},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"h4","props":{"id":"avanda-config"},"children":[{"type":"text","value":"Avanda Config"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The avanda config is the configuration for the avanda client, it accepts the url of the server and optionally the url of the websocket server url, if you don't pass the websocket url, the client will use the same url as the server url"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAvandaConfig({\n    rootUrl: \"https://avanda-server-url\",\n    wsUrl? : \"https://avanda-web-socket-server-url\" // avanda uses the root url by default\n})\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"setAvandaConfig"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    rootUrl"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"https://avanda-server-url"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    wsUrl? "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"https://avanda-web-socket-server-url"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7B7F8B"}},"children":[{"type":"text","value":"// avanda uses the root url by default"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"})"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAvandaConfig({\n    rootUrl: \"https://avanda-server-url\",\n    wsUrl? : \"https://avanda-web-socket-server-url\" // avanda uses the root url by default\n})\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"setAvandaConfig"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    rootUrl"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"https://avanda-server-url"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    wsUrl? "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"https://avanda-web-socket-server-url"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7B7F8B"}},"children":[{"type":"text","value":"// avanda uses the root url by default"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"})"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"axios-config"},"children":[{"type":"text","value":"Axios Config"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The axios config is the configuration for the axios client, it accepts the axios config, you can read more about axios config "},{"type":"element","tag":"a","props":{"href":"https://axios-http.com/docs/req_config","rel":["nofollow","noopener","noreferrer"],"target":"_blank"},"children":[{"type":"text","value":"here"}]},{"type":"text","value":", You can pass the bearer token in the axios config, the client will automatically add the bearer token to the request headers to authenticate the request."}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAxiosRequestConfig({\n    baseURL: \"BASE_URL\", // the base url of the server\n    withCredentials: true,\n})\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"setAxiosRequestConfig"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    baseURL"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7B7F8B"}},"children":[{"type":"text","value":"// the base url of the server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    withCredentials"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#BF9EEE"}},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"})"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"Avanda.setAxiosRequestConfig({\n    baseURL: \"BASE_URL\", // the base url of the server\n    withCredentials: true,\n})\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"setAxiosRequestConfig"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    baseURL"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#7B7F8B"}},"children":[{"type":"text","value":"// the base url of the server"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    withCredentials"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#BF9EEE"}},"children":[{"type":"text","value":"true"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"})"}]}]}]}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"making-requests"},"children":[{"type":"text","value":"Making Requests"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To make a request you need the controller name and the function name, and can be passed into the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"service"}]},{"type":"text","value":" method, in the form "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"text","value":",then the "},{"type":"element","tag":"a","props":{"href":"#request-methods"},"children":[{"type":"text","value":"request method"}]},{"type":"text","value":", You can optionally add more "},{"type":"element","tag":"a","props":{"href":"#request-options"},"children":[{"type":"text","value":"request options"}]}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"();"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"();"}]}]}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"request-methods"},"children":[{"type":"text","value":"Request Methods"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"These are the methods you can use to make requests:"}]},{"type":"element","tag":"h4","props":{"id":"get"},"children":[{"type":"text","value":"get()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"get"}]},{"type":"text","value":" request to your avanda server"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"();"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get();\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"();"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"post"},"children":[{"type":"text","value":"post()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"post"}]},{"type":"text","value":" request to your avanda server, it accepts the post data as argument"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").post({key: \"value\"});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"post"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({key"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"});"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").post({key: \"value\"})\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"post"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({key"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"})"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"update"},"children":[{"type":"text","value":"update()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"update"}]},{"type":"text","value":" request to your avanda server, it accepts the update data as argument"}]},{"type":"element","tag":"h4","props":{"id":"delete"},"children":[{"type":"text","value":"delete()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to make "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"delete"}]},{"type":"text","value":" request to your avanda server, delete data can be as a query param "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"param"}]}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").delete().param({key: \"value\"});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"delete"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"param"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({key"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"});"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":" await new Avanda.service(\"ControllerName/FunctionName\").delete().param({key: \"value\"});\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"delete"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"param"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({key"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"});"}]}]}]}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"request-options"},"children":[{"type":"text","value":"Request Options"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"These are the options you can optionally use to make requests:"}]},{"type":"element","tag":"h4","props":{"id":"fetch"},"children":[{"type":"text","value":"fetch()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to select the fields you want to fetch from the server, it accepts the fields as the first argument and the nested function request which a new instance of an avanda request as the second argument, the nested function request is optional, you can read more about nested functions "},{"type":"element","tag":"a","props":{"href":"/guide/controllers#nested-functions"},"children":[{"type":"text","value":"here"}]}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\"field1\", \"field2\");\n\n// with nested function\nawait new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#7B7F8B"}},"children":[{"type":"text","value":"// with nested function"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"Contoller/NestedFunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"fieldName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"param"},"children":[{"type":"text","value":"param()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to add query params to your request, it accepts the query params as argument"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().param({key: \"value\"});\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"param"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({key"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"});"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().param({key: \"value\"});\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"param"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"({key"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"value"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"});"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"select"},"children":[{"type":"text","value":"select()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to select the fields you want to fetch from the server,It accepts the fields as the arguments, it is an alias of the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"fetch"}]},{"type":"text","value":" method without a nested function request"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"select"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"select"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"selectall"},"children":[{"type":"text","value":"selectAll()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to select all the fields you want to fetch from the server,It works the same as the "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"select"}]},{"type":"text","value":" method but it selects all the fields in the caseo of an array of objects"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"select"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().select(\"field1\", \"field2\");\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"select"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]}]},{"type":"element","tag":"h4","props":{"id":"as"},"children":[{"type":"text","value":"as()"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This is use to rename the field name of the nested function request, it accepts the new field name as argument"}]},{"type":"element","tag":"code-group","props":{"toggle-text":"typescript,flutter"},"children":[{"type":"element","tag":"template","props":{"v-slot:typescript":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n","language":"typescript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"Contoller/NestedFunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"fieldName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]},{"type":"element","tag":"template","props":{"v-slot:flutter":""},"children":[{"type":"element","tag":"code","props":{"code":"await new Avanda.service(\"ControllerName/FunctionName\").get().fetch(\n    \"field1\", \"field2\",\n    new Avanda.service(\"Contoller/NestedFunctionName\").as(\"fieldName\")\n);\n","language":"javascript"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"ControllerName/FunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"fetch"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field1"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"field2"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":","}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"    "}]},{"type":"element","tag":"span","props":{"style":{"color":"#F286C4"}},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":" Avanda."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"service"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"Contoller/NestedFunctionName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")."}]},{"type":"element","tag":"span","props":{"style":{"color":"#62E884"}},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#E7EE98"}},"children":[{"type":"text","value":"fieldName"}]},{"type":"element","tag":"span","props":{"style":{"color":"#DEE492"}},"children":[{"type":"text","value":"\""}]},{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":")"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"style":{"color":"#F6F6F4"}},"children":[{"type":"text","value":");"}]}]}]}]}]}]}]},{"type":"element","tag":"blockquote","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For options on the response object, see "},{"type":"element","tag":"a","props":{"href":"/avanda-js/response"},"children":[{"type":"text","value":"Response Client"}]}]}]}],"toc":{"title":"","searchDepth":3,"depth":3,"links":[{"id":"installation","depth":2,"text":"Installation"},{"id":"usage","depth":2,"text":"Usage","children":[{"id":"configuring-avanda-client","depth":3,"text":"Configuring Avanda Client","children":[{"id":"avanda-config","depth":4,"text":"Avanda Config"},{"id":"axios-config","depth":4,"text":"Axios Config"}]}]},{"id":"making-requests","depth":2,"text":"Making Requests","children":[{"id":"request-methods","depth":3,"text":"Request Methods","children":[{"id":"get","depth":4,"text":"get()"},{"id":"post","depth":4,"text":"post()"},{"id":"update","depth":4,"text":"update()"},{"id":"delete","depth":4,"text":"delete()"}]},{"id":"request-options","depth":3,"text":"Request Options","children":[{"id":"fetch","depth":4,"text":"fetch()"},{"id":"param","depth":4,"text":"param()"},{"id":"select","depth":4,"text":"select()"},{"id":"selectall","depth":4,"text":"selectAll()"},{"id":"as","depth":4,"text":"as()"}]}]}]}},"_type":"markdown","_id":"content:2.components:3.avanda-js:1.client.md","_source":"content","_file":"2.components/3.avanda-js/1.client.md","_extension":"md"}