Sample code for 30+ languages & platforms
Go Requires Chilkat v11.0.0+

Example: Http.GetLastJsonData method

Demonstrates the GetLastJsonData method.

Chilkat Go Downloads

Go
    success := false

    http := chilkat.NewHttp()
    resp := chilkat.NewHttpResponse()

    //  Only allow TLS 1.2 or better.
    http.SetSslProtocol("TLS 1.2 or higher")

    success = http.HttpNoBody("GET","https://google.com/",resp)
    if success == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        resp.DisposeHttpResponse()
        return
    }

    json := chilkat.NewJsonObject()
    json.SetEmitCompact(false)

    http.GetLastJsonData(json)
    fmt.Println(*json.Emit())

    //  Output as of Chilkat v11.1.0
    //  Additional information may be added as requested or needed in future versions of Chilkat.

    //  {
    //    "tls": {
    //      "params": {
    //        "sniHostname": "www.google.com",
    //        "allowConnectionOnlyIfServerChooses": "TLS 1.2 or higher"
    //      },
    //      "negotiatedTlsVersion": "TLS 1.3"
    //    }
    //  }

    http.DisposeHttp()
    resp.DisposeHttpResponse()
    json.DisposeJsonObject()