Send HTTP requests
http:request(STRING method: "GET"
, STRING url
, data: ""
, ARRAY header: [ ]
, INT con_limit: 5
, INT total_limit: 20
, whitelist_bypass: 0)
http:request("GET", "https://priv_key@api.stripe.com/v1/balance")
#=> [
#=> "body" => "{\n \"object\": \"balance\",\n \"available\": [\n {\n \"amount\": 0,\n \"currency\": \"usd\",\n \"source_types\": {\n \"card\": 0\n }\n }\n ],\n \"livemode\": false,\n \"pending\": [\n {\n \"amount\": 0,\n \"currency\": \"usd\",\n \"source_types\": {\n \"card\": 0\n }\n }\n ]\n}\n",
#=> "header" => [
#=> "Server" => "nginx",
#=> "Date" => "Wed, 03 Jun 2020 20:38:51 GMT",
#=> "Content-Type" => "application/json",
#=> "Content-Length" => "301",
#=> "Connection" => "keep-alive",
#=> "access-control-allow-credentials" => "true",
#=> "access-control-allow-methods" => "GET, POST, HEAD, OPTIONS, DELETE",
#=> "access-control-allow-origin" => "*",
#=> "access-control-expose-headers" => "Request-Id, Stripe-Manage-Version, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required",
#=> "access-control-max-age" => "300",
#=> "cache-control" => "no-cache, no-store",
#=> "request-id" => "req_1TeiPx3VKEVfAw",
#=> "stripe-version" => "2018-09-24",
#=> "Strict-Transport-Security" => "max-age=31556926; includeSubDomains; preload"
#=> ],
#=> "info" => [
#=> "url" => "https://priv_key@api.stripe.com/v1/balance",
#=> "content_type" => "application/json",
#=> "header_size" => 618,
#=> "request_size" => 130,
#=> "ssl_verify_result" => FALSE,
#=> "redirect_count" => 0,
#=> "total_time" => 0.194632,
#=> "namelookup_time" => 0.006374,
#=> "connect_time" => 0.027582,
#=> "pretransfer_time" => 0.08046,
#=> "size_upload" => 0.0,
#=> "size_download" => 301.0,
#=> "speed_download" => 1551.0,
#=> "speed_upload" => 0.0,
#=> "download_content_length" => 301.0,
#=> "upload_content_length" => -1.0,
#=> "redirect_time" => 0.0,
#=> "redirect_url" => "",
#=> "primary_ip" => "52.25.214.31",
#=> "certinfo" => [],
#=> "primary_port" => 443
#=> ],
#=> "http_status_code" => 200,
#=> "ok?" => TRUE,
#=> "size" => 684
#=> ]
Copyright ©2013-2022 SunSed®. All rights reserved.