🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# GetJson `GetJson(Url, [Options]) {WebResponse}` `Url - {String}` `Options - {Dictionary}` *可选* Headers, Cookies, Querystring参数, 和 UrlSegments * `Headers`, `Cookies`, `QuerystringParams:Collection`的 `KeyValue` ([`WebHelpers.CreateKeyValue`](CreateKeyValue.md)创建) * `UrlSegments: Dictionary` 从给定的URL获取JSON(包含Headers,Cookies,QuerystringParams和UrlSegments的选项)。 ``` Dim Client As New WebClient Dim Url As String Url = "https://api.example.com/v1/messages/1" Dim Response As WebResponse Set Response = Client.GetJson(Url) Dim Headers As New Collection Headers.Add WebHelpers.CreateKeyValue("Authorization", "Bearer ...") Dim Options As New Dictionary Options.Add "Headers", Headers Set Response = Client.GetJson(Url, Options) ```