{"action":"created","issue":{"url":"https://api.github.com/repos/inspec/inspec/issues/2394","repository_url":"https://api.github.com/repos/inspec/inspec","labels_url":"https://api.github.com/repos/inspec/inspec/issues/2394/labels{/name}","comments_url":"https://api.github.com/repos/inspec/inspec/issues/2394/comments","events_url":"https://api.github.com/repos/inspec/inspec/issues/2394/events","html_url":"https://github.com/inspec/inspec/issues/2394","id":281732511,"node_id":"MDU6SXNzdWUyODE3MzI1MTE=","number":2394,"title":"JSON resource to do remote API calls ","user":{"login":"kmf","id":78700,"node_id":"MDQ6VXNlcjc4NzAw","avatar_url":"https://avatars0.githubusercontent.com/u/78700?v=4","gravatar_id":"","url":"https://api.github.com/users/kmf","html_url":"https://github.com/kmf","followers_url":"https://api.github.com/users/kmf/followers","following_url":"https://api.github.com/users/kmf/following{/other_user}","gists_url":"https://api.github.com/users/kmf/gists{/gist_id}","starred_url":"https://api.github.com/users/kmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmf/subscriptions","organizations_url":"https://api.github.com/users/kmf/orgs","repos_url":"https://api.github.com/users/kmf/repos","events_url":"https://api.github.com/users/kmf/events{/privacy}","received_events_url":"https://api.github.com/users/kmf/received_events","type":"User","site_admin":false},"labels":[{"id":311135804,"node_id":"MDU6TGFiZWwzMTExMzU4MDQ=","url":"https://api.github.com/repos/inspec/inspec/labels/Type:%20Feature%20Request","name":"Type: Feature Request","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-12-13T12:29:59Z","updated_at":"2018-12-24T06:40:42Z","closed_at":null,"author_association":"NONE","body":"I would love to use the JSON resource to test remote API calls over https or http\r\n\r\n```\r\ndescribe json('https://something.web/to/name.json') do\r\n  its('name') { should eq 'hello' }\r\n  its(['meta','creator']) { should eq 'John Doe' }\r\n  its(['array', 1]) { should eq 'one' }\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/inspec/inspec/issues/comments/449693069","html_url":"https://github.com/inspec/inspec/issues/2394#issuecomment-449693069","issue_url":"https://api.github.com/repos/inspec/inspec/issues/2394","id":449693069,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTY5MzA2OQ==","user":{"login":"nsr99","id":46099629,"node_id":"MDQ6VXNlcjQ2MDk5NjI5","avatar_url":"https://avatars0.githubusercontent.com/u/46099629?v=4","gravatar_id":"","url":"https://api.github.com/users/nsr99","html_url":"https://github.com/nsr99","followers_url":"https://api.github.com/users/nsr99/followers","following_url":"https://api.github.com/users/nsr99/following{/other_user}","gists_url":"https://api.github.com/users/nsr99/gists{/gist_id}","starred_url":"https://api.github.com/users/nsr99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsr99/subscriptions","organizations_url":"https://api.github.com/users/nsr99/orgs","repos_url":"https://api.github.com/users/nsr99/repos","events_url":"https://api.github.com/users/nsr99/events{/privacy}","received_events_url":"https://api.github.com/users/nsr99/received_events","type":"User","site_admin":false},"created_at":"2018-12-24T06:40:42Z","updated_at":"2018-12-24T06:40:42Z","author_association":"NONE","body":"I am trying to test Azure Load Balancer with inspec using the API calls. My control file looks like below:\r\n\r\n**Control file:**\r\n```\r\ncontrol \"file_check\" do\r\n    http_request = http('https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myResourceGroupSLB/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendPool?api-version=2018-08-01',\r\n                                    headers: {\r\n                                        'Accept' => 'application/json',\r\n                                        'Authorization' => 'Bearer <my-API-token>'\r\n                                     })\r\n    describe json(content: http_request.body) do\r\n      its('name') { should eq 'hello' }\r\n    end\r\nend\r\n```\r\n\r\n**Profile file inspec.yml**\r\n```\r\nname: new_profile\r\ntitle: Checking compliance of resources\r\nlicense: Apache-2.0\r\nsummary: Inspec test for compliance\r\nversion: 1.0\r\ninspec_version: '>= 2.1.81'\r\ndepends:\r\n  - name: inspec-azure\r\n    url: https://github.com/inspec/inspec-azure/archive/master.tar.gz\r\nsupports:\r\n  - platform: azure\r\n```\r\n\r\nWhen running the test I am getting below error:\r\n\r\n **×  file_check: /home/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/newtest/test/integration/new_profile/controls/basic.rb:13\r\n     ×  Control Source Code Error /home/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/new-test/test/integration/new_profile/controls/basic.rb:13\r\n     undefined method `body' for nil:NilClass**\r\n\r\nSeems like nothing is stored in http_request, Can anyone suggest where is the issue?"}}
{"actor":{"display_login":"nsr99"}}