{"id":2457,"date":"2025-11-11T09:25:36","date_gmt":"2025-11-11T02:25:36","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=2457"},"modified":"2025-11-12T16:33:41","modified_gmt":"2025-11-12T09:33:41","slug":"axrequestservice","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/atlasx-core\/http-service\/axrequestservice\/","title":{"rendered":"AxRequestService"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" style=\"font-style:normal;font-weight:600\">AxRequestService<\/h1>\n\n\n\n<p>\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e27\u0e34\u0e2a\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e14\u0e36\u0e07\u0e02\u0e48\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01 API \u0e14\u0e49\u0e27\u0e22 HTTP request<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"when-to-use\"><strong>When To Use<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0e43\u0e0a\u0e49\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01 API \u0e14\u0e49\u0e27\u0e22 HTTP request<\/li>\n\n\n\n<li>\u0e43\u0e0a\u0e49\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e40\u0e23\u0e35\u0e22\u0e01 stored procedure \u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e43\u0e19 database \u0e14\u0e49\u0e27\u0e22 HTTP request<\/li>\n<\/ul>\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>import { AxHttpServiceModule } from '@atlasx\/core\/http-service'<\/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: #AF00DB\">import<\/span><span style=\"color: #000000\"> { <\/span><span style=\"color: #001080\">AxHttpServiceModule<\/span><span style=\"color: #000000\"> } <\/span><span style=\"color: #AF00DB\">from<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;@atlasx\/core\/http-service&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"example\"><strong>Example<\/strong><\/h2>\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>import { AxRequestService } from '@atlasx\/core\/http-service'<\/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: #AF00DB\">import<\/span><span style=\"color: #000000\"> { <\/span><span style=\"color: #001080\">AxRequestService<\/span><span style=\"color: #000000\"> } <\/span><span style=\"color: #AF00DB\">from<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;@atlasx\/core\/http-service&#39;<\/span><\/span><\/code><\/pre><\/div>\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>@Component({\n  selector: 'app-root',\n  templateUrl: '.\/app.component.html',\n  styleUrls: &#91;'.\/app.component.scss'&#93;,\n})\nexport class AppComponent implements OnInit {\n  constructor(private requestService: AxRequestService) {}\n\n  ngOnInit() {\n    this.requestService.get('https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appconfig').subscribe(\n      (data) => {\n        console.log(data)\n      },\n      (error) => {\n        console.log(error)\n      }\n    )\n  }\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: #000000\">@<\/span><span style=\"color: #795E26\">Component<\/span><span style=\"color: #000000\">({<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">selector:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;app-root&#39;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">templateUrl:<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&#39;.\/app.component.html&#39;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">styleUrls:<\/span><span style=\"color: #000000\"> &#91;<\/span><span style=\"color: #A31515\">&#39;.\/app.component.scss&#39;<\/span><span style=\"color: #000000\">&#93;,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">})<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">export<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">class<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">AppComponent<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">implements<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">OnInit<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">constructor<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #0000FF\">private<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">requestService<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #267F99\">AxRequestService<\/span><span style=\"color: #000000\">) {}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #795E26\">ngOnInit<\/span><span style=\"color: #000000\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0000FF\">this<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">requestService<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">get<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&#39;https:\/\/portal-atlasx.cdg.co.th\/axws-demo\/api\/appconfig&#39;<\/span><span style=\"color: #000000\">).<\/span><span style=\"color: #795E26\">subscribe<\/span><span style=\"color: #000000\">(<\/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: #0000FF\">=&gt;<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #001080\">console<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">log<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">data<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      (<\/span><span style=\"color: #001080\">error<\/span><span style=\"color: #000000\">) <\/span><span style=\"color: #0000FF\">=&gt;<\/span><span style=\"color: #000000\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #001080\">console<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #795E26\">log<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">error<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"methods\"><strong>Methods<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"request\"><strong>request()<\/strong><\/h3>\n\n\n\n<p>\u0e40\u0e23\u0e35\u0e22\u0e01&nbsp;<code>HTTPRequest<\/code>&nbsp;\u0e41\u0e25\u0e30\u0e04\u0e37\u0e19\u0e04\u0e48\u0e32&nbsp;<code>Observable<\/code>&nbsp;\u0e02\u0e2d\u0e07\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/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>request&lt;T>(\n  url: string,\n  method: AxHttpMethod,\n  body: any | null = null,\n  params: any = {}\n): Observable&lt;T><\/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: #795E26\">request<\/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\">url<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">method<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">AxHttpMethod<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">body<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">any<\/span><span style=\"color: #000000\"> | <\/span><span style=\"color: #0000FF\">null<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #0000FF\">null<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">params<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">any<\/span><span style=\"color: #000000\"> = {}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">): <\/span><span style=\"color: #001080\">Observable<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #0070C1\">T<\/span><span style=\"color: #000000\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"parameters\"><strong>Parameters<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>url<\/td><td>The endpoint URL.<\/td><td><code>string<\/code><\/td><td>&#8211;<\/td><\/tr><tr><td>method<\/td><td>The HTTP method.<\/td><td><code>AxHttpMethod<\/code><\/td><td>&#8211;<\/td><\/tr><tr><td>body<\/td><td>The request body e.g. FormData, JSON.<\/td><td><code>any<\/code><\/td><td><code>null<\/code><\/td><\/tr><tr><td>params<\/td><td>The HTTP params to send with the request.<\/td><td><code>any<\/code><\/td><td><code>{}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"returns\"><strong>Returns<\/strong><\/h4>\n\n\n\n<p><code>Observable&lt;T&gt;<\/code>:&nbsp;<code>Observable<\/code>&nbsp;\u0e02\u0e2d\u0e07&nbsp;<code>HTTPResponse<\/code>&nbsp;\u0e14\u0e49\u0e27\u0e22 response body \u0e15\u0e32\u0e21\u0e0a\u0e19\u0e34\u0e14\u0e02\u0e2d\u0e07&nbsp;<code>T<\/code>&nbsp;\u0e17\u0e35\u0e48 request \u0e44\u0e1b<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sp\"><strong>sp()<\/strong><\/h3>\n\n\n\n<p>\u0e2a\u0e48\u0e07&nbsp;<code>HTTPRequest<\/code>&nbsp;\u0e1e\u0e23\u0e49\u0e2d\u0e21\u0e41\u0e19\u0e1a\u0e1e\u0e32\u0e23\u0e32\u0e21\u0e34\u0e40\u0e15\u0e2d\u0e23\u0e4c\u0e02\u0e2d\u0e07 stored procedure \u0e41\u0e25\u0e30\u0e04\u0e37\u0e19\u0e04\u0e48\u0e32&nbsp;<code>Observable<\/code>&nbsp;\u0e02\u0e2d\u0e07\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/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>sp&lt;T>(\n  procedure: string,\n  method: 'GET' | 'POST'\n  params: any = {}\n): Observable&lt;T><\/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: #795E26\">sp<\/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\">procedure<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">method<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&#39;GET&#39;<\/span><span style=\"color: #000000\"> | <\/span><span style=\"color: #A31515\">&#39;POST&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #001080\">params<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">any<\/span><span style=\"color: #000000\"> = {}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">): <\/span><span style=\"color: #001080\">Observable<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #0070C1\">T<\/span><span style=\"color: #000000\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"parameters-1\"><strong>Parameters<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>procedure<\/td><td>The procedure name.<\/td><td><code>string<\/code><\/td><td>&#8211;<\/td><\/tr><tr><td>method<\/td><td>The HTTP method. (GET, POST)<\/td><td><code>'GET' | 'POST'<\/code><\/td><td>&#8211;<\/td><\/tr><tr><td>params<\/td><td>The parameter of procedure.<\/td><td><code>any<\/code><\/td><td><code>{}<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"returns-1\"><strong>Returns<\/strong><\/h4>\n\n\n\n<p><code>Observable&lt;T&gt;<\/code>:&nbsp;<code>Observable<\/code>&nbsp;\u0e02\u0e2d\u0e07&nbsp;<code>HTTPResponse<\/code>&nbsp;\u0e14\u0e49\u0e27\u0e22 response body \u0e15\u0e32\u0e21\u0e0a\u0e19\u0e34\u0e14\u0e02\u0e2d\u0e07&nbsp;<code>T<\/code>&nbsp;\u0e17\u0e35\u0e48 request \u0e44\u0e1b<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"json\"><strong>json()<\/strong><\/h3>\n\n\n\n<p>\u0e2a\u0e48\u0e07&nbsp;<code>HTTPRequest<\/code>&nbsp;\u0e41\u0e25\u0e30\u0e04\u0e37\u0e19\u0e04\u0e48\u0e32&nbsp;<code>Observable<\/code>&nbsp;\u0e02\u0e2d\u0e07\u0e1c\u0e25\u0e25\u0e31\u0e1e\u0e18\u0e4c<\/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>json&lt;T>(url: string): Observable&lt;T><\/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: #795E26\">json<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #267F99\">T<\/span><span style=\"color: #000000\">&gt;(<\/span><span style=\"color: #001080\">url<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">string<\/span><span style=\"color: #000000\">): <\/span><span style=\"color: #001080\">Observable<\/span><span style=\"color: #000000\">&lt;<\/span><span style=\"color: #0070C1\">T<\/span><span style=\"color: #000000\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"parameters-2\"><strong>Parameters<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>url<\/td><td>The JSON endpoint URL.<\/td><td><code>string<\/code><\/td><td>&#8211;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"returns-2\"><strong>Returns<\/strong><\/h4>\n\n\n\n<p><code>Observable&lt;T&gt;<\/code>:&nbsp;<code>Observable<\/code>&nbsp;\u0e02\u0e2d\u0e07&nbsp;<code>HTTPResponse<\/code>&nbsp;\u0e14\u0e49\u0e27\u0e22 response body \u0e15\u0e32\u0e21\u0e0a\u0e19\u0e34\u0e14\u0e02\u0e2d\u0e07&nbsp;<code>T<\/code>&nbsp;\u0e17\u0e35\u0e48 request \u0e44\u0e1b<\/p>\n","protected":false},"featured_media":0,"parent":2448,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-2457","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2457","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=2457"}],"version-history":[{"count":8,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2457\/revisions"}],"predecessor-version":[{"id":2566,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2457\/revisions\/2566"}],"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=2457"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=2457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}