<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 概述 VBA-Web由三個主要組件組成: **WebClient** 執行請求并處理響應,并負責請求之間共享的功能,例如身份驗證,代理配置和安全性。 它被設計為長期存在,維護請求之間的狀態(例如,身份驗證令牌)。 **WebRequest** 用于創建詳細請求,包括自動格式化,查詢字符串,標頭,cookie等等。 **WebResponse** 包裝http / cURL響應并包括自動解析的數據。 以下示例是VBA-Web模塊的標準表單: 1. 一個長期存在的`WebClient`,用于設置所有請求共享的基本URL 2. 一個詳細的`WebRequest`(設置`Resource`,`Method`和`Format`) 3. 包含響應,包括基于`Request.Format`自動轉換的`Data` ~~~ '// 長期客戶端,在請求之間維護狀態 Private ClientInstance As WebClient Public Property Get Client() As WebClient If ClientInstance Is Nothing Then '// 設置所有請求共享的基本URL Set ClientInstance = New WebClient ClientInstance.BaseUrl = "https://www.example.com/api/" End If Set Client = ClientInstance End Property Public Function GetProjects() As Collection '// 使用GET和json(用于請求和響應) Dim Request As New WebRequest Request.Resource = "projects" Request.Method = WebMethod.HttpGet Request.Format = WebFormat.Json Dim Response As WebResponse Set Response = Client.Execute(Request) '// -> GET https://www.example.com/api/projects '// '// <- HTTP/1.1 200 OK '// ... '// {"data":[{"id":1,"name":"Project 1"},{"id":2,"name":"Project 2"}]} If Response.StatusCode <> WebStatus.Ok Then Err.Raise Response.StatusCode, "GetProjects", Response.Content Else '// 響應由Request.Format自動轉換為Dictionary / Collection Set GetProjects = Response.Data("data") End If End Function ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看