Sha256: c889365e76c40e36204bac018d78c1fc4aaa2122c67eb636d60eafcdd355eca2

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

#  Licensed to the Apache Software Foundation (ASF) under one or more
#  contributor license agreements.  See the NOTICE file distributed with
#  this work for additional information regarding copyright ownership.
#  The ASF licenses this file to You under the Apache License, Version 2.0
#  (the "License"); you may not use this file except in compliance with
#  the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

require_relative '../../../lib/skywalking'
require 'net/http'
require 'uri'
require 'json'

Skywalking.start

url = URI.parse('http://httpbin.org/json?a=1')

response = Net::HTTP.get_response(url)

if response.is_a?(Net::HTTPSuccess)
  puts JSON.pretty_generate(JSON.parse(response.body))
else
  puts "Error..."
end

sleep 10

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
skywalking-0.1.0 spec/scenarios/net_http/net_http.rb
skywalking-0.0.0.beta2 spec/scenarios/net_http/net_http.rb
skywalking-0.0.0.beta1 spec/scenarios/net_http/net_http.rb