{"id":2458,"date":"2025-11-11T09:26:15","date_gmt":"2025-11-11T02:26:15","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=2458"},"modified":"2025-11-12T16:33:41","modified_gmt":"2025-11-12T09:33:41","slug":"axresponse","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/atlasx-core\/http-service\/axresponse\/","title":{"rendered":"AxResponse"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" style=\"font-style:normal;font-weight:600\">AxResponse<\/h1>\n\n\n\n<p>Data type \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a response \u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 AtlasX Web Service<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>type AxResponse&lt;T> = {\n  success?: boolean\n  total?: number\n  message?: string\n  data?: T[]\n  &#91;key: string&#93;: any\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">type<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">AxResponse<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">T<\/span><span style=\"color: #000000\">&gt; = {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">success<\/span><span style=\"color: #000000\">?: <\/span><span style=\"color: #267F99\">boolean<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">total<\/span><span style=\"color: #000000\">?: <\/span><span style=\"color: #267F99\">number<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">message<\/span><span style=\"color: #000000\">?: <\/span><span style=\"color: #267F99\">string<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">?: <\/span><span style=\"color: #267F99\">T<\/span><span style=\"color: #000000\">[]<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  &#91;<\/span><span style=\"color: #001080\">key<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\">&#93;: <\/span><span style=\"color: #267F99\">any<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"properties\">Properties<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Properties<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>success : boolean<\/code><\/td><td>Response status.<\/td><\/tr><tr><td><code>total : number<\/code><\/td><td>Number record of data set.<\/td><\/tr><tr><td><code>message : string<\/code><\/td><td>Message response from web service.<\/td><\/tr><tr><td><code>data: T[]<\/code><\/td><td>A set of data set.<\/td><\/tr><tr><td><code>[key: string]: any<\/code><\/td><td>Any other properties.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"featured_media":0,"parent":2448,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-2458","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=2458"}],"version-history":[{"count":5,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2458\/revisions"}],"predecessor-version":[{"id":2569,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2458\/revisions\/2569"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2448"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=2458"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=2458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}