mu 5.7.2.6 → 5.7.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mu.rb +0 -1
- data/lib/mu/api/scale.rb +1 -1
- data/rdoc/Gemfile.html +194 -0
- data/rdoc/LICENSE_txt.html +201 -0
- data/rdoc/Mu.html +478 -0
- data/rdoc/Mu/Client.html +461 -0
- data/rdoc/Mu/Command.html +338 -0
- data/rdoc/Mu/Command/API.html +844 -0
- data/rdoc/Mu/Command/Cmd_appid.html +1342 -0
- data/rdoc/Mu/Command/Cmd_cli.html +800 -0
- data/rdoc/Mu/Command/Cmd_ddt.html +1612 -0
- data/rdoc/Mu/Command/Cmd_homepage.html +762 -0
- data/rdoc/Mu/Command/Cmd_muapi.html +1363 -0
- data/rdoc/Mu/Command/Cmd_netconfig.html +1077 -0
- data/rdoc/Mu/Command/Cmd_runscale.html +1441 -0
- data/rdoc/Mu/Command/Cmd_runscenario.html +787 -0
- data/rdoc/Mu/Command/Cmd_runverify.html +893 -0
- data/rdoc/Mu/Command/Cmd_scale.html +1323 -0
- data/rdoc/Mu/Command/Cmd_system.html +677 -0
- data/rdoc/Mu/Command/Curl.html +751 -0
- data/rdoc/Mu/Command/Help.html +305 -0
- data/rdoc/Mu/Curl.html +243 -0
- data/rdoc/Mu/Curl/Error.html +304 -0
- data/rdoc/Mu/Curl/Error/Authorize.html +355 -0
- data/rdoc/Mu/Curl/Error/Connect.html +286 -0
- data/rdoc/Mu/Curl/Error/DNS.html +236 -0
- data/rdoc/Mu/Curl/Error/Region.html +307 -0
- data/rdoc/Mu/Curl/Error/Status.html +286 -0
- data/rdoc/Mu/Curl/Error/Timeout.html +286 -0
- data/rdoc/Mu/Curl/Verify.html +472 -0
- data/rdoc/Mu/Curl/Verify/Request.html +424 -0
- data/rdoc/Mu/Curl/Verify/Response.html +372 -0
- data/rdoc/Mu/Curl/Verify/Result.html +373 -0
- data/rdoc/Mu/Ddt.html +1347 -0
- data/rdoc/Mu/Helper.html +517 -0
- data/rdoc/Mu/Homepage.html +719 -0
- data/rdoc/Mu/HttpHelper.html +890 -0
- data/rdoc/Mu/Muapi.html +1226 -0
- data/rdoc/Mu/Netconfig.html +1178 -0
- data/rdoc/Mu/Scale.html +1359 -0
- data/rdoc/Mu/System.html +504 -0
- data/rdoc/Object.html +285 -0
- data/rdoc/README_rdoc.html +892 -0
- data/rdoc/Rakefile.html +257 -0
- data/rdoc/TCTestMu.html +2583 -0
- data/rdoc/Test.html +235 -0
- data/rdoc/Test/Unit.html +235 -0
- data/rdoc/Test/Unit/TestCase.html +236 -0
- data/rdoc/Test/helper_rb.html +62 -0
- data/rdoc/Test/tc_test_mu_rb.html +60 -0
- data/rdoc/VERSION.html +179 -0
- data/rdoc/bin/mu.html +54 -0
- data/rdoc/created.rid +36 -1
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/index.html +880 -20
- data/rdoc/js/darkfish.js +116 -0
- data/rdoc/js/jquery.js +32 -0
- data/rdoc/js/quicksearch.js +114 -0
- data/rdoc/js/thickbox-compressed.js +10 -0
- data/rdoc/lib/mu/api/ddt_rb.html +52 -0
- data/rdoc/lib/mu/api/homepage_rb.html +52 -0
- data/rdoc/lib/mu/api/muapi_rb.html +52 -0
- data/rdoc/lib/mu/api/netconfig_rb.html +52 -0
- data/rdoc/lib/mu/api/scale_rb.html +52 -0
- data/rdoc/lib/mu/api/system_rb.html +52 -0
- data/rdoc/lib/mu/client_rb.html +52 -0
- data/rdoc/lib/mu/command/api_rb.html +52 -0
- data/rdoc/lib/mu/command/cmd_appid_rb.html +62 -0
- data/rdoc/lib/mu/command/cmd_cli_rb.html +55 -0
- data/rdoc/lib/mu/command/cmd_ddt_rb.html +60 -0
- data/rdoc/lib/mu/command/cmd_homepage_rb.html +57 -0
- data/rdoc/lib/mu/command/cmd_muapi_rb.html +59 -0
- data/rdoc/lib/mu/command/cmd_netconfig_rb.html +58 -0
- data/rdoc/lib/mu/command/cmd_runscale_rb.html +62 -0
- data/rdoc/lib/mu/command/cmd_runscenario_rb.html +57 -0
- data/rdoc/lib/mu/command/cmd_runverify_rb.html +61 -0
- data/rdoc/lib/mu/command/cmd_scale_rb.html +58 -0
- data/rdoc/lib/mu/command/cmd_system_rb.html +59 -0
- data/rdoc/lib/mu/command/curl_rb.html +52 -0
- data/rdoc/lib/mu/command/help_rb.html +52 -0
- data/rdoc/lib/mu/command_rb.html +55 -0
- data/rdoc/lib/mu/curl/error_rb.html +52 -0
- data/rdoc/lib/mu/curl/verify_rb.html +52 -0
- data/rdoc/lib/mu/helper_rb.html +52 -0
- data/rdoc/lib/mu/http_helper_rb.html +52 -0
- data/rdoc/lib/mu_rb.html +80 -0
- data/rdoc/rdoc.css +706 -0
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +117 -117
- data/test/data/{scale_configuration.json → scale.json} +11 -11
- metadata +142 -407
- data/rdoc/classes/Mu.src/M000001.html +0 -39
- data/rdoc/classes/Mu.src/M000002.html +0 -29
- data/rdoc/classes/Mu.src/M000053.html +0 -39
- data/rdoc/classes/Mu.src/M000054.html +0 -29
- data/rdoc/classes/Mu/Client.src/M000212.html +0 -24
- data/rdoc/classes/Mu/Client.src/M000213.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000214.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000215.html +0 -18
- data/rdoc/classes/Mu/Client.src/M000216.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000130.html +0 -22
- data/rdoc/classes/Mu/Command/API.src/M000131.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000132.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000133.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000134.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000135.html +0 -17
- data/rdoc/classes/Mu/Command/API.src/M000136.html +0 -23
- data/rdoc/classes/Mu/Command/API.src/M000137.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000138.html +0 -29
- data/rdoc/classes/Mu/Command/API.src/M000139.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000140.html +0 -22
- data/rdoc/classes/Mu/Command/API.src/M000141.html +0 -19
- data/rdoc/classes/Mu/Command/API.src/M000142.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000143.html +0 -18
- data/rdoc/classes/Mu/Command/API.src/M000144.html +0 -17
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000053.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000054.html +0 -30
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000055.html +0 -39
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000056.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000145.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000146.html +0 -30
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000147.html +0 -39
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000148.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000200.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000201.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000202.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000203.html +0 -19
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000204.html +0 -20
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000205.html +0 -20
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000101.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000102.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000103.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000104.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000105.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000106.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000107.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000108.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000109.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000110.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000111.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000112.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000113.html +0 -43
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000114.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000115.html +0 -38
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000116.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000117.html +0 -38
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000118.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000119.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000120.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000121.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000122.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000206.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000207.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000208.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000209.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000210.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000211.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000164.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000165.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000166.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000167.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000168.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000169.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000170.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000171.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000172.html +0 -28
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000173.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000174.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000175.html +0 -28
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000176.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000177.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000178.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000179.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000180.html +0 -24
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000060.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000061.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000062.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000063.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000064.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000065.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000066.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000067.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000068.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000069.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000070.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000071.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000152.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000153.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000154.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000155.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000156.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000157.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000158.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000159.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000160.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000161.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000162.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000163.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000003.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000004.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000005.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000057.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000058.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000059.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000149.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000150.html +0 -51
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000151.html +0 -50
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000128.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000129.html +0 -144
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000198.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000199.html +0 -200
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000181.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000182.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000183.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000184.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000185.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000186.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000187.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000188.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000189.html +0 -23
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000190.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000191.html +0 -29
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000192.html +0 -27
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000193.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000194.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000195.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000196.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000197.html +0 -22
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000097.html +0 -18
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000098.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000099.html +0 -21
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000100.html +0 -21
- data/rdoc/classes/Mu/Command/Curl.src/M000124.html +0 -18
- data/rdoc/classes/Mu/Command/Curl.src/M000125.html +0 -21
- data/rdoc/classes/Mu/Command/Curl.src/M000126.html +0 -26
- data/rdoc/classes/Mu/Command/Help.src/M000123.html +0 -38
- data/rdoc/classes/Mu/Curl/Error.src/M000063.html +0 -18
- data/rdoc/classes/Mu/Curl/Error/Authorize.src/M000065.html +0 -22
- data/rdoc/classes/Mu/Curl/Error/Connect.src/M000068.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Region.src/M000066.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Status.src/M000064.html +0 -19
- data/rdoc/classes/Mu/Curl/Error/Timeout.src/M000067.html +0 -19
- data/rdoc/classes/Mu/Curl/Verify.src/M000055.html +0 -29
- data/rdoc/classes/Mu/Curl/Verify.src/M000056.html +0 -18
- data/rdoc/classes/Mu/Curl/Verify.src/M000057.html +0 -46
- data/rdoc/classes/Mu/Curl/Verify.src/M000058.html +0 -18
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000061.html +0 -35
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000062.html +0 -23
- data/rdoc/classes/Mu/Curl/Verify/Response.src/M000059.html +0 -24
- data/rdoc/classes/Mu/Curl/Verify/Result.src/M000060.html +0 -25
- data/rdoc/classes/Mu/Ddt.src/M000242.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000243.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000244.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000245.html +0 -23
- data/rdoc/classes/Mu/Ddt.src/M000246.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000247.html +0 -32
- data/rdoc/classes/Mu/Ddt.src/M000248.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000249.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000250.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000251.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000252.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000253.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000254.html +0 -25
- data/rdoc/classes/Mu/Ddt.src/M000255.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000256.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000257.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000258.html +0 -24
- data/rdoc/classes/Mu/Ddt.src/M000259.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000260.html +0 -35
- data/rdoc/classes/Mu/Ddt.src/M000261.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000262.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000263.html +0 -20
- data/rdoc/classes/Mu/Ddt.src/M000264.html +0 -22
- data/rdoc/classes/Mu/Homepage.src/M000236.html +0 -25
- data/rdoc/classes/Mu/Homepage.src/M000237.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000238.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000239.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000240.html +0 -20
- data/rdoc/classes/Mu/Homepage.src/M000241.html +0 -20
- data/rdoc/classes/Mu/HttpHelper.src/M000069.html +0 -22
- data/rdoc/classes/Mu/HttpHelper.src/M000070.html +0 -25
- data/rdoc/classes/Mu/HttpHelper.src/M000071.html +0 -34
- data/rdoc/classes/Mu/HttpHelper.src/M000072.html +0 -39
- data/rdoc/classes/Mu/HttpHelper.src/M000073.html +0 -36
- data/rdoc/classes/Mu/HttpHelper.src/M000074.html +0 -34
- data/rdoc/classes/Mu/HttpHelper.src/M000075.html +0 -46
- data/rdoc/classes/Mu/HttpHelper.src/M000076.html +0 -24
- data/rdoc/classes/Mu/HttpHelper.src/M000077.html +0 -19
- data/rdoc/classes/Mu/HttpHelper.src/M000078.html +0 -33
- data/rdoc/classes/Mu/HttpHelper.src/M000079.html +0 -29
- data/rdoc/classes/Mu/Muapi.src/M000080.html +0 -25
- data/rdoc/classes/Mu/Muapi.src/M000081.html +0 -27
- data/rdoc/classes/Mu/Muapi.src/M000082.html +0 -24
- data/rdoc/classes/Mu/Muapi.src/M000083.html +0 -27
- data/rdoc/classes/Mu/Muapi.src/M000084.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000085.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000086.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000087.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000088.html +0 -23
- data/rdoc/classes/Mu/Muapi.src/M000089.html +0 -22
- data/rdoc/classes/Mu/Muapi.src/M000090.html +0 -21
- data/rdoc/classes/Mu/Muapi.src/M000091.html +0 -19
- data/rdoc/classes/Mu/Muapi.src/M000092.html +0 -18
- data/rdoc/classes/Mu/Muapi.src/M000093.html +0 -18
- data/rdoc/classes/Mu/Muapi.src/M000094.html +0 -36
- data/rdoc/classes/Mu/Muapi.src/M000095.html +0 -34
- data/rdoc/classes/Mu/Muapi.src/M000096.html +0 -34
- data/rdoc/classes/Mu/Netconfig.src/M000072.html +0 -25
- data/rdoc/classes/Mu/Netconfig.src/M000073.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000074.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000075.html +0 -24
- data/rdoc/classes/Mu/Netconfig.src/M000076.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000077.html +0 -36
- data/rdoc/classes/Mu/Netconfig.src/M000078.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000079.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000080.html +0 -39
- data/rdoc/classes/Mu/Netconfig.src/M000081.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000082.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000083.html +0 -26
- data/rdoc/classes/Mu/Netconfig.src/M000084.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000085.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000086.html +0 -19
- data/rdoc/classes/Mu/Netconfig.src/M000217.html +0 -25
- data/rdoc/classes/Mu/Netconfig.src/M000218.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000219.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000220.html +0 -24
- data/rdoc/classes/Mu/Netconfig.src/M000221.html +0 -20
- data/rdoc/classes/Mu/Netconfig.src/M000222.html +0 -36
- data/rdoc/classes/Mu/Netconfig.src/M000223.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000224.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000225.html +0 -37
- data/rdoc/classes/Mu/Netconfig.src/M000226.html +0 -21
- data/rdoc/classes/Mu/Netconfig.src/M000227.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000228.html +0 -26
- data/rdoc/classes/Mu/Netconfig.src/M000229.html +0 -23
- data/rdoc/classes/Mu/Netconfig.src/M000230.html +0 -22
- data/rdoc/classes/Mu/Netconfig.src/M000231.html +0 -19
- data/rdoc/classes/Mu/Scale.src/M000006.html +0 -47
- data/rdoc/classes/Mu/Scale.src/M000007.html +0 -27
- data/rdoc/classes/Mu/Scale.src/M000008.html +0 -22
- data/rdoc/classes/Mu/Scale.src/M000009.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000010.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000011.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000012.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000013.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000014.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000015.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000016.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000017.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000018.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000019.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000020.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000021.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000022.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000023.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000024.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000025.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000265.html +0 -46
- data/rdoc/classes/Mu/Scale.src/M000266.html +0 -27
- data/rdoc/classes/Mu/Scale.src/M000267.html +0 -22
- data/rdoc/classes/Mu/Scale.src/M000268.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000269.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000270.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000271.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000272.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000273.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000274.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000275.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000276.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000277.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000278.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000279.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000280.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000281.html +0 -20
- data/rdoc/classes/Mu/Scale.src/M000282.html +0 -20
- data/rdoc/classes/Mu/System.src/M000232.html +0 -25
- data/rdoc/classes/Mu/System.src/M000233.html +0 -20
- data/rdoc/classes/Mu/System.src/M000234.html +0 -20
- data/rdoc/classes/Mu/System.src/M000235.html +0 -20
- data/rdoc/classes/Object.src/M000052.html +0 -18
- data/rdoc/classes/TCTestMu.src/M000001.html +0 -24
- data/rdoc/classes/TCTestMu.src/M000002.html +0 -18
- data/rdoc/classes/TCTestMu.src/M000003.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000004.html +0 -33
- data/rdoc/classes/TCTestMu.src/M000005.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000006.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000007.html +0 -26
- data/rdoc/classes/TCTestMu.src/M000008.html +0 -29
- data/rdoc/classes/TCTestMu.src/M000009.html +0 -39
- data/rdoc/classes/TCTestMu.src/M000010.html +0 -38
- data/rdoc/classes/TCTestMu.src/M000011.html +0 -38
- data/rdoc/classes/TCTestMu.src/M000012.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000013.html +0 -25
- data/rdoc/classes/TCTestMu.src/M000014.html +0 -25
- data/rdoc/classes/TCTestMu.src/M000015.html +0 -33
- data/rdoc/classes/TCTestMu.src/M000016.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000017.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000018.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000019.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000020.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000021.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000022.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000023.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000024.html +0 -44
- data/rdoc/classes/TCTestMu.src/M000025.html +0 -53
- data/rdoc/classes/TCTestMu.src/M000026.html +0 -22
- data/rdoc/classes/TCTestMu.src/M000027.html +0 -49
- data/rdoc/classes/TCTestMu.src/M000028.html +0 -40
- data/rdoc/classes/TCTestMu.src/M000029.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000030.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000031.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000032.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000033.html +0 -27
- data/rdoc/classes/TCTestMu.src/M000034.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000035.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000036.html +0 -41
- data/rdoc/classes/TCTestMu.src/M000037.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000038.html +0 -24
- data/rdoc/classes/TCTestMu.src/M000039.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000040.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000041.html +0 -32
- data/rdoc/classes/TCTestMu.src/M000042.html +0 -26
- data/rdoc/classes/TCTestMu.src/M000043.html +0 -28
- data/rdoc/classes/TCTestMu.src/M000044.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000045.html +0 -23
- data/rdoc/classes/TCTestMu.src/M000046.html +0 -21
- data/rdoc/classes/TCTestMu.src/M000047.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000048.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000049.html +0 -22
- data/rdoc/classes/TCTestMu.src/M000050.html +0 -20
- data/rdoc/classes/TCTestMu.src/M000051.html +0 -35
- data/test/helper.rb +0 -18
- data/test/tc_test_mu.rb +0 -720
|
@@ -0,0 +1,890 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
5
|
+
<head>
|
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
7
|
+
|
|
8
|
+
<title>Class: Mu::HttpHelper</title>
|
|
9
|
+
|
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
|
11
|
+
|
|
12
|
+
<script src="../js/jquery.js" type="text/javascript"
|
|
13
|
+
charset="utf-8"></script>
|
|
14
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript"
|
|
15
|
+
charset="utf-8"></script>
|
|
16
|
+
<script src="../js/quicksearch.js" type="text/javascript"
|
|
17
|
+
charset="utf-8"></script>
|
|
18
|
+
<script src="../js/darkfish.js" type="text/javascript"
|
|
19
|
+
charset="utf-8"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body class="class">
|
|
23
|
+
|
|
24
|
+
<div id="metadata">
|
|
25
|
+
<div id="home-metadata">
|
|
26
|
+
<div id="home-section" class="section">
|
|
27
|
+
<h3 class="section-header">
|
|
28
|
+
<a href="../index.html">Home</a>
|
|
29
|
+
<a href="../index.html#classes">Classes</a>
|
|
30
|
+
<a href="../index.html#methods">Methods</a>
|
|
31
|
+
</h3>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div id="file-metadata">
|
|
36
|
+
<div id="file-list-section" class="section">
|
|
37
|
+
<h3 class="section-header">In Files</h3>
|
|
38
|
+
<div class="section-body">
|
|
39
|
+
<ul>
|
|
40
|
+
|
|
41
|
+
<li><a href="../lib/mu/http_helper_rb.html?TB_iframe=true&height=550&width=785"
|
|
42
|
+
class="thickbox" title="lib/mu/http_helper.rb">lib/mu/http_helper.rb</a></li>
|
|
43
|
+
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="class-metadata">
|
|
52
|
+
|
|
53
|
+
<!-- Parent Class -->
|
|
54
|
+
|
|
55
|
+
<div id="parent-class-section" class="section">
|
|
56
|
+
<h3 class="section-header">Parent</h3>
|
|
57
|
+
|
|
58
|
+
<p class="link"><a href="../Object.html">Object</a></p>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!-- Namespace Contents -->
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<!-- Method Quickref -->
|
|
67
|
+
|
|
68
|
+
<div id="method-list-section" class="section">
|
|
69
|
+
<h3 class="section-header">Methods</h3>
|
|
70
|
+
<ul class="link-list">
|
|
71
|
+
|
|
72
|
+
<li><a href="#method-c-new">::new</a></li>
|
|
73
|
+
|
|
74
|
+
<li><a href="#method-i-delete">#delete</a></li>
|
|
75
|
+
|
|
76
|
+
<li><a href="#method-i-download_file">#download_file</a></li>
|
|
77
|
+
|
|
78
|
+
<li><a href="#method-i-get">#get</a></li>
|
|
79
|
+
|
|
80
|
+
<li><a href="#method-i-get_json">#get_json</a></li>
|
|
81
|
+
|
|
82
|
+
<li><a href="#method-i-get_xml">#get_xml</a></li>
|
|
83
|
+
|
|
84
|
+
<li><a href="#method-i-post">#post</a></li>
|
|
85
|
+
|
|
86
|
+
<li><a href="#method-i-post_form">#post_form</a></li>
|
|
87
|
+
|
|
88
|
+
<li><a href="#method-i-post_json">#post_json</a></li>
|
|
89
|
+
|
|
90
|
+
<li><a href="#method-i-post_xml">#post_xml</a></li>
|
|
91
|
+
|
|
92
|
+
<li><a href="#method-i-put_json">#put_json</a></li>
|
|
93
|
+
|
|
94
|
+
</ul>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<!-- Included Modules -->
|
|
99
|
+
|
|
100
|
+
<div id="includes-section" class="section">
|
|
101
|
+
<h3 class="section-header">Included Modules</h3>
|
|
102
|
+
<ul class="link-list">
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<li><span class="include">Helper</span></li>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</ul>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div id="project-metadata">
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
<div id="fileindex-section" class="section project-section">
|
|
117
|
+
<h3 class="section-header">Files</h3>
|
|
118
|
+
<ul>
|
|
119
|
+
|
|
120
|
+
<li class="file"><a href="../Gemfile.html">Gemfile</a></li>
|
|
121
|
+
|
|
122
|
+
<li class="file"><a href="../LICENSE_txt.html">LICENSE.txt</a></li>
|
|
123
|
+
|
|
124
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
|
125
|
+
|
|
126
|
+
<li class="file"><a href="../Rakefile.html">Rakefile</a></li>
|
|
127
|
+
|
|
128
|
+
<li class="file"><a href="../VERSION.html">VERSION</a></li>
|
|
129
|
+
|
|
130
|
+
</ul>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<div id="classindex-section" class="section project-section">
|
|
135
|
+
<h3 class="section-header">Class Index
|
|
136
|
+
<span class="search-toggle"><img src="../images/find.png"
|
|
137
|
+
height="16" width="16" alt="[+]"
|
|
138
|
+
title="show/hide quicksearch" /></span></h3>
|
|
139
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
140
|
+
<fieldset>
|
|
141
|
+
<legend>Quicksearch</legend>
|
|
142
|
+
<input type="text" name="quicksearch" value=""
|
|
143
|
+
class="quicksearch-field" />
|
|
144
|
+
</fieldset>
|
|
145
|
+
</form>
|
|
146
|
+
|
|
147
|
+
<ul class="link-list">
|
|
148
|
+
|
|
149
|
+
<li><a href="../Mu.html">Mu</a></li>
|
|
150
|
+
|
|
151
|
+
<li><a href="../Mu/Client.html">Mu::Client</a></li>
|
|
152
|
+
|
|
153
|
+
<li><a href="../Mu/Command.html">Mu::Command</a></li>
|
|
154
|
+
|
|
155
|
+
<li><a href="../Mu/Command/API.html">Mu::Command::API</a></li>
|
|
156
|
+
|
|
157
|
+
<li><a href="../Mu/Command/API.html">Mu::Command::API</a></li>
|
|
158
|
+
|
|
159
|
+
<li><a href="../Mu/Command/Cmd_appid.html">Mu::Command::Cmd_appid</a></li>
|
|
160
|
+
|
|
161
|
+
<li><a href="../Mu/Command/Cmd_cli.html">Mu::Command::Cmd_cli</a></li>
|
|
162
|
+
|
|
163
|
+
<li><a href="../Mu/Command/Cmd_ddt.html">Mu::Command::Cmd_ddt</a></li>
|
|
164
|
+
|
|
165
|
+
<li><a href="../Mu/Command/Cmd_homepage.html">Mu::Command::Cmd_homepage</a></li>
|
|
166
|
+
|
|
167
|
+
<li><a href="../Mu/Command/Cmd_muapi.html">Mu::Command::Cmd_muapi</a></li>
|
|
168
|
+
|
|
169
|
+
<li><a href="../Mu/Command/Cmd_netconfig.html">Mu::Command::Cmd_netconfig</a></li>
|
|
170
|
+
|
|
171
|
+
<li><a href="../Mu/Command/Cmd_runscale.html">Mu::Command::Cmd_runscale</a></li>
|
|
172
|
+
|
|
173
|
+
<li><a href="../Mu/Command/Cmd_runscenario.html">Mu::Command::Cmd_runscenario</a></li>
|
|
174
|
+
|
|
175
|
+
<li><a href="../Mu/Command/Cmd_runverify.html">Mu::Command::Cmd_runverify</a></li>
|
|
176
|
+
|
|
177
|
+
<li><a href="../Mu/Command/Cmd_scale.html">Mu::Command::Cmd_scale</a></li>
|
|
178
|
+
|
|
179
|
+
<li><a href="../Mu/Command/Cmd_system.html">Mu::Command::Cmd_system</a></li>
|
|
180
|
+
|
|
181
|
+
<li><a href="../Mu/Command/Curl.html">Mu::Command::Curl</a></li>
|
|
182
|
+
|
|
183
|
+
<li><a href="../Mu/Command/Help.html">Mu::Command::Help</a></li>
|
|
184
|
+
|
|
185
|
+
<li><a href="../Mu/Curl.html">Mu::Curl</a></li>
|
|
186
|
+
|
|
187
|
+
<li><a href="../Mu/Curl/Error.html">Mu::Curl::Error</a></li>
|
|
188
|
+
|
|
189
|
+
<li><a href="../Mu/Curl/Error/Authorize.html">Mu::Curl::Error::Authorize</a></li>
|
|
190
|
+
|
|
191
|
+
<li><a href="../Mu/Curl/Error/Connect.html">Mu::Curl::Error::Connect</a></li>
|
|
192
|
+
|
|
193
|
+
<li><a href="../Mu/Curl/Error/DNS.html">Mu::Curl::Error::DNS</a></li>
|
|
194
|
+
|
|
195
|
+
<li><a href="../Mu/Curl/Error/Region.html">Mu::Curl::Error::Region</a></li>
|
|
196
|
+
|
|
197
|
+
<li><a href="../Mu/Curl/Error/Status.html">Mu::Curl::Error::Status</a></li>
|
|
198
|
+
|
|
199
|
+
<li><a href="../Mu/Curl/Error/Timeout.html">Mu::Curl::Error::Timeout</a></li>
|
|
200
|
+
|
|
201
|
+
<li><a href="../Mu/Curl/Verify.html">Mu::Curl::Verify</a></li>
|
|
202
|
+
|
|
203
|
+
<li><a href="../Mu/Curl/Verify/Request.html">Mu::Curl::Verify::Request</a></li>
|
|
204
|
+
|
|
205
|
+
<li><a href="../Mu/Curl/Verify/Response.html">Mu::Curl::Verify::Response</a></li>
|
|
206
|
+
|
|
207
|
+
<li><a href="../Mu/Curl/Verify/Result.html">Mu::Curl::Verify::Result</a></li>
|
|
208
|
+
|
|
209
|
+
<li><a href="../Mu/Ddt.html">Mu::Ddt</a></li>
|
|
210
|
+
|
|
211
|
+
<li><a href="../Mu/Helper.html">Mu::Helper</a></li>
|
|
212
|
+
|
|
213
|
+
<li><a href="../Mu/Homepage.html">Mu::Homepage</a></li>
|
|
214
|
+
|
|
215
|
+
<li><a href="../Mu/HttpHelper.html">Mu::HttpHelper</a></li>
|
|
216
|
+
|
|
217
|
+
<li><a href="../Mu/Muapi.html">Mu::Muapi</a></li>
|
|
218
|
+
|
|
219
|
+
<li><a href="../Mu/Netconfig.html">Mu::Netconfig</a></li>
|
|
220
|
+
|
|
221
|
+
<li><a href="../Mu/Scale.html">Mu::Scale</a></li>
|
|
222
|
+
|
|
223
|
+
<li><a href="../Mu/System.html">Mu::System</a></li>
|
|
224
|
+
|
|
225
|
+
<li><a href="../Test.html">Test</a></li>
|
|
226
|
+
|
|
227
|
+
<li><a href="../Test/Unit.html">Test::Unit</a></li>
|
|
228
|
+
|
|
229
|
+
<li><a href="../Test/Unit/TestCase.html">Test::Unit::TestCase</a></li>
|
|
230
|
+
|
|
231
|
+
<li><a href="../Object.html">Object</a></li>
|
|
232
|
+
|
|
233
|
+
<li><a href="../TCTestMu.html">TCTestMu</a></li>
|
|
234
|
+
|
|
235
|
+
</ul>
|
|
236
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<div id="documentation">
|
|
244
|
+
<h1 class="class">Mu::HttpHelper</h1>
|
|
245
|
+
|
|
246
|
+
<div id="description">
|
|
247
|
+
|
|
248
|
+
</div>
|
|
249
|
+
|
|
250
|
+
<!-- Constants -->
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
<!-- Attributes -->
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
<!-- Methods -->
|
|
257
|
+
|
|
258
|
+
<div id="public-class-method-details" class="method-section section">
|
|
259
|
+
<h3 class="section-header">Public Class Methods</h3>
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
<div id="new-method" class="method-detail ">
|
|
263
|
+
<a name="method-c-new"></a>
|
|
264
|
+
|
|
265
|
+
<div class="method-heading">
|
|
266
|
+
|
|
267
|
+
<span class="method-name">new</span><span
|
|
268
|
+
class="method-args">(host, username, password, docroot)</span>
|
|
269
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
270
|
+
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
<div class="method-description">
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
<div class="method-source-code"
|
|
280
|
+
id="new-source">
|
|
281
|
+
<pre>
|
|
282
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 5</span>
|
|
283
|
+
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">docroot</span>)
|
|
284
|
+
6: <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
285
|
+
7: <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
286
|
+
8: <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
287
|
+
9: <span class="ruby-ivar">@docroot</span> = <span class="ruby-identifier">docroot</span>
|
|
288
|
+
10: <span class="ruby-identifier">$cookie</span> = <span class="ruby-value str">""</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">nil?</span>
|
|
289
|
+
11: <span class="ruby-keyword kw">end</span></pre>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
<div id="public-instance-method-details" class="method-section section">
|
|
303
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
<div id="delete-method" class="method-detail ">
|
|
307
|
+
<a name="method-i-delete"></a>
|
|
308
|
+
|
|
309
|
+
<div class="method-heading">
|
|
310
|
+
|
|
311
|
+
<span class="method-name">delete</span><span
|
|
312
|
+
class="method-args">(e)</span>
|
|
313
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
314
|
+
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<div class="method-description">
|
|
318
|
+
|
|
319
|
+
<p>
|
|
320
|
+
basic delete call
|
|
321
|
+
</p>
|
|
322
|
+
<pre>
|
|
323
|
+
* e = the url suffix</pre>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
<div class="method-source-code"
|
|
328
|
+
id="delete-source">
|
|
329
|
+
<pre>
|
|
330
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 184</span>
|
|
331
|
+
184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
332
|
+
185: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
333
|
+
186: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">url</span>)
|
|
334
|
+
187: <span class="ruby-keyword kw">end</span></pre>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
<div id="download-file-method" class="method-detail ">
|
|
346
|
+
<a name="method-i-download_file"></a>
|
|
347
|
+
|
|
348
|
+
<div class="method-heading">
|
|
349
|
+
|
|
350
|
+
<span class="method-name">download_file</span><span
|
|
351
|
+
class="method-args">(e, filename, p={})</span>
|
|
352
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
353
|
+
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
<div class="method-description">
|
|
357
|
+
|
|
358
|
+
<p>
|
|
359
|
+
fetches a file and stores it locally
|
|
360
|
+
</p>
|
|
361
|
+
<pre>
|
|
362
|
+
* e = the url suffix
|
|
363
|
+
* filename = the name to store the file locally
|
|
364
|
+
* p = hash of parameters, such as headers</pre>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
<div class="method-source-code"
|
|
369
|
+
id="download-file-source">
|
|
370
|
+
<pre>
|
|
371
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 216</span>
|
|
372
|
+
216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">download_file</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">p</span>={})
|
|
373
|
+
217: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
374
|
+
218: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
375
|
+
219: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
376
|
+
220: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>)
|
|
377
|
+
221: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
378
|
+
222: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
379
|
+
223: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"Could not download"</span>)
|
|
380
|
+
224: <span class="ruby-identifier">msg</span> <span class="ruby-value str">"==> Could not download the file"</span>
|
|
381
|
+
225: <span class="ruby-keyword kw">return</span> <span class="ruby-value">1</span>
|
|
382
|
+
226: <span class="ruby-keyword kw">end</span>
|
|
383
|
+
227: <span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"wb"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">body</span>) }
|
|
384
|
+
228: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">filename</span>)
|
|
385
|
+
229: <span class="ruby-keyword kw">end</span></pre>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
<div id="get-method" class="method-detail ">
|
|
397
|
+
<a name="method-i-get"></a>
|
|
398
|
+
|
|
399
|
+
<div class="method-heading">
|
|
400
|
+
|
|
401
|
+
<span class="method-name">get</span><span
|
|
402
|
+
class="method-args">(e, p={})</span>
|
|
403
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
404
|
+
|
|
405
|
+
</div>
|
|
406
|
+
|
|
407
|
+
<div class="method-description">
|
|
408
|
+
|
|
409
|
+
<p>
|
|
410
|
+
basic get call
|
|
411
|
+
</p>
|
|
412
|
+
<pre>
|
|
413
|
+
* e = the url suffix
|
|
414
|
+
* p = hash of parameters, such as headers</pre>
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
<div class="method-source-code"
|
|
419
|
+
id="get-source">
|
|
420
|
+
<pre>
|
|
421
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 18</span>
|
|
422
|
+
18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
423
|
+
19: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
424
|
+
20: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
425
|
+
21: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
426
|
+
22: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
427
|
+
23: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
428
|
+
24: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
429
|
+
25: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
430
|
+
26: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
431
|
+
27: <span class="ruby-keyword kw">end</span></pre>
|
|
432
|
+
</div>
|
|
433
|
+
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
<div id="get-json-method" class="method-detail ">
|
|
443
|
+
<a name="method-i-get_json"></a>
|
|
444
|
+
|
|
445
|
+
<div class="method-heading">
|
|
446
|
+
|
|
447
|
+
<span class="method-name">get_json</span><span
|
|
448
|
+
class="method-args">(e, p={})</span>
|
|
449
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
450
|
+
|
|
451
|
+
</div>
|
|
452
|
+
|
|
453
|
+
<div class="method-description">
|
|
454
|
+
|
|
455
|
+
<p>
|
|
456
|
+
get call for json, converts the response to json if applicable
|
|
457
|
+
</p>
|
|
458
|
+
<pre>
|
|
459
|
+
* e = the url suffix
|
|
460
|
+
* p = hash of parameters, such as headers</pre>
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
<div class="method-source-code"
|
|
465
|
+
id="get-json-source">
|
|
466
|
+
<pre>
|
|
467
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 32</span>
|
|
468
|
+
32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
469
|
+
33: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
470
|
+
34: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
471
|
+
35: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
472
|
+
36: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
473
|
+
37: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
474
|
+
38: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
475
|
+
39: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
476
|
+
40: <span class="ruby-keyword kw">begin</span>
|
|
477
|
+
41: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
478
|
+
42: <span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
479
|
+
43: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
480
|
+
44: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
481
|
+
45: <span class="ruby-keyword kw">end</span>
|
|
482
|
+
46: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
483
|
+
47: <span class="ruby-comment cmt"># nothing to do</span>
|
|
484
|
+
48: <span class="ruby-keyword kw">end</span>
|
|
485
|
+
49: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
486
|
+
50: <span class="ruby-keyword kw">end</span></pre>
|
|
487
|
+
</div>
|
|
488
|
+
|
|
489
|
+
</div>
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
</div>
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
<div id="get-xml-method" class="method-detail ">
|
|
498
|
+
<a name="method-i-get_xml"></a>
|
|
499
|
+
|
|
500
|
+
<div class="method-heading">
|
|
501
|
+
|
|
502
|
+
<span class="method-name">get_xml</span><span
|
|
503
|
+
class="method-args">(e, p={})</span>
|
|
504
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
505
|
+
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
<div class="method-description">
|
|
509
|
+
|
|
510
|
+
<p>
|
|
511
|
+
get call for xml, converts the response to xml if applicable
|
|
512
|
+
</p>
|
|
513
|
+
<pre>
|
|
514
|
+
* e = the url suffix
|
|
515
|
+
* p = hash of parameters, such as headers</pre>
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
<div class="method-source-code"
|
|
520
|
+
id="get-xml-source">
|
|
521
|
+
<pre>
|
|
522
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 55</span>
|
|
523
|
+
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_xml</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
524
|
+
56: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
525
|
+
57: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
526
|
+
58: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
527
|
+
59: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
528
|
+
60: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
529
|
+
61: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
530
|
+
62: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
531
|
+
63: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
532
|
+
64: <span class="ruby-keyword kw">begin</span>
|
|
533
|
+
65: <span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/<.+>/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">resp</span>)
|
|
534
|
+
66: <span class="ruby-identifier">xmldoc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">resp</span>)
|
|
535
|
+
67: <span class="ruby-keyword kw">else</span>
|
|
536
|
+
68: <span class="ruby-identifier">err_node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'err_node'</span>, <span class="ruby-identifier">xmldoc</span>)
|
|
537
|
+
69: <span class="ruby-identifier">err_node</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">resp</span>
|
|
538
|
+
70: <span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">err_node</span>
|
|
539
|
+
71: <span class="ruby-keyword kw">end</span>
|
|
540
|
+
72: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
541
|
+
73: <span class="ruby-identifier">msg</span> <span class="ruby-value str">"Error parsing XML "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
542
|
+
74: <span class="ruby-keyword kw">ensure</span>
|
|
543
|
+
75: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">xmldoc</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
544
|
+
76: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">xmldoc</span>
|
|
545
|
+
77: <span class="ruby-keyword kw">end</span>
|
|
546
|
+
78: <span class="ruby-keyword kw">end</span></pre>
|
|
547
|
+
</div>
|
|
548
|
+
|
|
549
|
+
</div>
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
</div>
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
<div id="post-method" class="method-detail ">
|
|
558
|
+
<a name="method-i-post"></a>
|
|
559
|
+
|
|
560
|
+
<div class="method-heading">
|
|
561
|
+
|
|
562
|
+
<span class="method-name">post</span><span
|
|
563
|
+
class="method-args">(e, body="", p = {})</span>
|
|
564
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
565
|
+
|
|
566
|
+
</div>
|
|
567
|
+
|
|
568
|
+
<div class="method-description">
|
|
569
|
+
|
|
570
|
+
<p>
|
|
571
|
+
basic post call
|
|
572
|
+
</p>
|
|
573
|
+
<pre>
|
|
574
|
+
* e = the url suffix
|
|
575
|
+
* body = the data to post
|
|
576
|
+
* p = hash of parameters, such as headers</pre>
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
<div class="method-source-code"
|
|
581
|
+
id="post-source">
|
|
582
|
+
<pre>
|
|
583
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 84</span>
|
|
584
|
+
84: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">body</span>=<span class="ruby-value str">""</span>, <span class="ruby-identifier">p</span> = {})
|
|
585
|
+
85: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
586
|
+
86: <span class="ruby-identifier">msg</span> <span class="ruby-node">"#{url} #{body}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
587
|
+
87: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
588
|
+
88: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
589
|
+
89: <span class="ruby-identifier">msg</span>(<span class="ruby-node">"using cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
590
|
+
90: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">body</span>, <span class="ruby-identifier">params</span>)
|
|
591
|
+
91: <span class="ruby-comment cmt"># msg resp.headers</span>
|
|
592
|
+
92: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
593
|
+
93: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
594
|
+
94: <span class="ruby-keyword kw">begin</span>
|
|
595
|
+
95: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
596
|
+
96: <span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
597
|
+
97: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
598
|
+
98: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
599
|
+
99: <span class="ruby-keyword kw">end</span>
|
|
600
|
+
100: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
601
|
+
101: <span class="ruby-comment cmt"># do nothing</span>
|
|
602
|
+
102: <span class="ruby-keyword kw">end</span>
|
|
603
|
+
103: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
604
|
+
104: <span class="ruby-keyword kw">end</span></pre>
|
|
605
|
+
</div>
|
|
606
|
+
|
|
607
|
+
</div>
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
</div>
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
<div id="post-form-method" class="method-detail ">
|
|
616
|
+
<a name="method-i-post_form"></a>
|
|
617
|
+
|
|
618
|
+
<div class="method-heading">
|
|
619
|
+
|
|
620
|
+
<span class="method-name">post_form</span><span
|
|
621
|
+
class="method-args">(e, filepath, p = {})</span>
|
|
622
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
623
|
+
|
|
624
|
+
</div>
|
|
625
|
+
|
|
626
|
+
<div class="method-description">
|
|
627
|
+
|
|
628
|
+
<p>
|
|
629
|
+
post call for uploading form data
|
|
630
|
+
</p>
|
|
631
|
+
<ul>
|
|
632
|
+
<li><p>
|
|
633
|
+
e = the url suffix
|
|
634
|
+
</p>
|
|
635
|
+
</li>
|
|
636
|
+
<li><p>
|
|
637
|
+
filepath = the file to post
|
|
638
|
+
</p>
|
|
639
|
+
</li>
|
|
640
|
+
<li><p>
|
|
641
|
+
p = hash of parameters, such as headers
|
|
642
|
+
</p>
|
|
643
|
+
</li>
|
|
644
|
+
</ul>
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
<div class="method-source-code"
|
|
649
|
+
id="post-form-source">
|
|
650
|
+
<pre>
|
|
651
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 170</span>
|
|
652
|
+
170: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_form</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">p</span> = {})
|
|
653
|
+
171: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
654
|
+
172: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
655
|
+
173: <span class="ruby-identifier">params</span> = { <span class="ruby-value">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/x-www-form-urlencoded"</span>, <span class="ruby-value">:file</span> =<span class="ruby-operator">></span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filepath</span>, <span class="ruby-value str">'rb'</span>) }
|
|
656
|
+
174: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
657
|
+
175: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
658
|
+
176: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
659
|
+
177: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
660
|
+
178: <span class="ruby-keyword kw">end</span></pre>
|
|
661
|
+
</div>
|
|
662
|
+
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
</div>
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
<div id="post-json-method" class="method-detail ">
|
|
672
|
+
<a name="method-i-post_json"></a>
|
|
673
|
+
|
|
674
|
+
<div class="method-heading">
|
|
675
|
+
|
|
676
|
+
<span class="method-name">post_json</span><span
|
|
677
|
+
class="method-args">(e, json, p = {})</span>
|
|
678
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
679
|
+
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
<div class="method-description">
|
|
683
|
+
|
|
684
|
+
<p>
|
|
685
|
+
post call for uploading json
|
|
686
|
+
</p>
|
|
687
|
+
<ul>
|
|
688
|
+
<li><p>
|
|
689
|
+
e = the url suffix
|
|
690
|
+
</p>
|
|
691
|
+
</li>
|
|
692
|
+
<li><p>
|
|
693
|
+
body = the json object to post
|
|
694
|
+
</p>
|
|
695
|
+
</li>
|
|
696
|
+
<li><p>
|
|
697
|
+
p = hash of parameters, such as headers
|
|
698
|
+
</p>
|
|
699
|
+
</li>
|
|
700
|
+
</ul>
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
<div class="method-source-code"
|
|
705
|
+
id="post-json-source">
|
|
706
|
+
<pre>
|
|
707
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 110</span>
|
|
708
|
+
110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">p</span> = {})
|
|
709
|
+
111: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
710
|
+
112: <span class="ruby-identifier">msg</span> <span class="ruby-node">"#{url} #{json}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
711
|
+
113: <span class="ruby-identifier">params</span> = { <span class="ruby-value">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/json"</span> }.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
712
|
+
114: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
713
|
+
115: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">params</span> )
|
|
714
|
+
116: <span class="ruby-keyword kw">begin</span>
|
|
715
|
+
117: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
716
|
+
118: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
717
|
+
119: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
718
|
+
120: <span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
719
|
+
121: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
720
|
+
122: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
721
|
+
123: <span class="ruby-keyword kw">end</span>
|
|
722
|
+
124: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
723
|
+
125: <span class="ruby-comment cmt"># msg e, Logger::DEBUG</span>
|
|
724
|
+
126: <span class="ruby-keyword kw">end</span>
|
|
725
|
+
127: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
726
|
+
128: <span class="ruby-keyword kw">end</span></pre>
|
|
727
|
+
</div>
|
|
728
|
+
|
|
729
|
+
</div>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
</div>
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
<div id="post-xml-method" class="method-detail ">
|
|
738
|
+
<a name="method-i-post_xml"></a>
|
|
739
|
+
|
|
740
|
+
<div class="method-heading">
|
|
741
|
+
|
|
742
|
+
<span class="method-name">post_xml</span><span
|
|
743
|
+
class="method-args">(e, doc, p = {})</span>
|
|
744
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
745
|
+
|
|
746
|
+
</div>
|
|
747
|
+
|
|
748
|
+
<div class="method-description">
|
|
749
|
+
|
|
750
|
+
<p>
|
|
751
|
+
post call for uploading xml
|
|
752
|
+
</p>
|
|
753
|
+
<ul>
|
|
754
|
+
<li><p>
|
|
755
|
+
e = the url suffix
|
|
756
|
+
</p>
|
|
757
|
+
</li>
|
|
758
|
+
<li><p>
|
|
759
|
+
body = the xml object to post
|
|
760
|
+
</p>
|
|
761
|
+
</li>
|
|
762
|
+
<li><p>
|
|
763
|
+
p = hash of parameters, such as headers
|
|
764
|
+
</p>
|
|
765
|
+
</li>
|
|
766
|
+
</ul>
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
<div class="method-source-code"
|
|
771
|
+
id="post-xml-source">
|
|
772
|
+
<pre>
|
|
773
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 134</span>
|
|
774
|
+
134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_xml</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">doc</span>, <span class="ruby-identifier">p</span> = {})
|
|
775
|
+
135: <span class="ruby-keyword kw">begin</span>
|
|
776
|
+
136: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
777
|
+
137: <span class="ruby-identifier">msg</span> <span class="ruby-node">"post to #{url}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
778
|
+
138: <span class="ruby-identifier">params</span> = { <span class="ruby-value">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/xml"</span> }.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
779
|
+
139: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
780
|
+
140: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">params</span> )
|
|
781
|
+
141: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
782
|
+
142: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
783
|
+
143: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
784
|
+
144: <span class="ruby-comment cmt"># XML Document</span>
|
|
785
|
+
145: <span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/<.+>/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">resp</span>)
|
|
786
|
+
146: <span class="ruby-identifier">xmldoc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">resp</span>)
|
|
787
|
+
147: <span class="ruby-keyword kw">else</span>
|
|
788
|
+
148: <span class="ruby-identifier">err_node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'err_node'</span>, <span class="ruby-identifier">xmldoc</span>)
|
|
789
|
+
149: <span class="ruby-identifier">err_node</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">resp</span>
|
|
790
|
+
150: <span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">err_node</span>
|
|
791
|
+
151: <span class="ruby-keyword kw">end</span>
|
|
792
|
+
152: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SocketError</span>
|
|
793
|
+
153: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Host "</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@host</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" nicht erreichbar"</span>
|
|
794
|
+
154: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
795
|
+
155: <span class="ruby-identifier">msg</span> <span class="ruby-value str">"error parsing XML "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
796
|
+
156: <span class="ruby-keyword kw">end</span>
|
|
797
|
+
157: <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//err_node"</span>).<span class="ruby-identifier">empty?</span>)
|
|
798
|
+
158: <span class="ruby-ivar">@posted_uuid</span> = <span class="ruby-keyword kw">nil</span>
|
|
799
|
+
159: <span class="ruby-keyword kw">end</span>
|
|
800
|
+
160: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">nil?</span>
|
|
801
|
+
161: <span class="ruby-ivar">@posted_uuid</span> = <span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//uuid"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">text</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//uuid"</span>).<span class="ruby-identifier">empty?</span>
|
|
802
|
+
162: <span class="ruby-keyword kw">end</span>
|
|
803
|
+
163: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">xmldoc</span>
|
|
804
|
+
164: <span class="ruby-keyword kw">end</span></pre>
|
|
805
|
+
</div>
|
|
806
|
+
|
|
807
|
+
</div>
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
</div>
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
<div id="put-json-method" class="method-detail ">
|
|
816
|
+
<a name="method-i-put_json"></a>
|
|
817
|
+
|
|
818
|
+
<div class="method-heading">
|
|
819
|
+
|
|
820
|
+
<span class="method-name">put_json</span><span
|
|
821
|
+
class="method-args">(e, json, p={})</span>
|
|
822
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
823
|
+
|
|
824
|
+
</div>
|
|
825
|
+
|
|
826
|
+
<div class="method-description">
|
|
827
|
+
|
|
828
|
+
<p>
|
|
829
|
+
put call for json
|
|
830
|
+
</p>
|
|
831
|
+
<pre>
|
|
832
|
+
* e = the url suffix
|
|
833
|
+
* body = the json object to put
|
|
834
|
+
* p = hash of parameters, such as headers</pre>
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
<div class="method-source-code"
|
|
839
|
+
id="put-json-source">
|
|
840
|
+
<pre>
|
|
841
|
+
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 193</span>
|
|
842
|
+
193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">p</span>={})
|
|
843
|
+
194: <span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
844
|
+
195: <span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
845
|
+
196: <span class="ruby-identifier">params</span>[<span class="ruby-value">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
846
|
+
197: <span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">put</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">json</span>, { <span class="ruby-value">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/json"</span> } )
|
|
847
|
+
198: <span class="ruby-keyword kw">begin</span>
|
|
848
|
+
199: <span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
849
|
+
200: <span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
850
|
+
201: <span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
851
|
+
202: <span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
852
|
+
203: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
853
|
+
204: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
854
|
+
205: <span class="ruby-keyword kw">end</span>
|
|
855
|
+
206: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
856
|
+
207: <span class="ruby-comment cmt"># msg e, Logger::DEBUG</span>
|
|
857
|
+
208: <span class="ruby-keyword kw">end</span>
|
|
858
|
+
209: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
859
|
+
210: <span class="ruby-keyword kw">end</span></pre>
|
|
860
|
+
</div>
|
|
861
|
+
|
|
862
|
+
</div>
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
</div>
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
</div>
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
</div>
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
877
|
+
|
|
878
|
+
<p>Disabled; run with --debug to generate this.</p>
|
|
879
|
+
|
|
880
|
+
</div>
|
|
881
|
+
|
|
882
|
+
<div id="validator-badges">
|
|
883
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
884
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
885
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
886
|
+
</div>
|
|
887
|
+
|
|
888
|
+
</body>
|
|
889
|
+
</html>
|
|
890
|
+
|