Send a GET request to a URL

http:get(STRING url
, ARRAY params: [ ]) : ARRAY

http:get('https://status.sunsed.com')
#> [
#>     "body" => "{\n    \"comment\": \"Average uptime is for the past 30 days. Please follow our twitter feed @SunSedApp for updates.\",\n    \"overal-status\": \"up\",\n    \"last-check\": 1569971153,\n    \"systems\": {\n        \"cdn.sunsed.com\": {\n            \"status\": \"up\",\n            \"uptime\": 100\n        },\n        \"image-api\": {\n            \"status\": \"up\",\n            \"uptime\": 100\n        },\n        \"mars.sunsed.com\": {\n            \"status\": \"up\",\n            \"uptime\": 100\n        },\n        \"venus.sunsed.com\": {\n            \"status\": \"up\",\n            \"uptime\": 100\n        },\n        \"www.sunsed.com\": {\n            \"status\": \"up\",\n            \"uptime\": 100\n        }\n    }\n}",
#>     "header" => [
#>         "Expires" => "Tue, 01 Oct 2019 23:07:53 GMT",
#>         "Cache-Control" => "public",
#>         "Content-Type" => "application/json",
#>         "X-Cloud-Trace-Context" => "d5868ee07023ab01dbe8833216f67452",
#>         "Date" => "Tue, 01 Oct 2019 23:05:53 GMT",
#>         "Server" => "Google Frontend",
#>         "Content-Length" => "658"
#>     ],
#>     "info" => [
#>         "url" => "https://status.sunsed.com/",
#>         "content_type" => "application/json",
#>         "header_size" => 254,
#>         "request_size" => 56,
#>         "ssl_verify_result" => FALSE,
#>         "redirect_count" => 0,
#>         "total_time" => 0.546717,
#>         "namelookup_time" => 0.012371,
#>         "connect_time" => 0.016332,
#>         "pretransfer_time" => 0.10679000000000005,
#>         "size_upload" => 0.0,
#>         "size_download" => 658.0,
#>         "speed_download" => 1203.0,
#>         "speed_upload" => 0.0,
#>         "download_content_length" => 658.0,
#>         "upload_content_length" => -1.0,
#>         "redirect_time" => 0.0,
#>         "redirect_url" => "",
#>         "primary_ip" => "108.177.112.121",
#>         "certinfo" => [],
#>         "primary_port" => 443,
#>         "http_version" => 2,
#>         "protocol" => 2,
#>         "scheme" => "HTTPS"
#>     ],
#>     "http_status_code" => 200,
#>     "ok?" => TRUE
#> ]

#===
http:get('https://status.sunsed.com')
#=> ERROR: uncaught_error_on_sunsed_l648 -- strlen() expects parameter 1 to be string, array given /var/lib/nginx/sunsed/SunSed/_/http.php 325

Copyright ©2013-2022 SunSed®. All rights reserved.