[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / core_nodes / deprecated / 90-httpget.html
1 <!--
2   Copyright 2013 IBM Corp.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8   http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15 -->
16
17 <script type="text/x-red" data-template-name="httpget">
18     <div class="form-tips"><b>Deprecated</b>: please use the <i>http request</i> node.</div>
19     <br>
20     <div class="form-row">
21         <label for="node-input-baseurl"><i class="fa fa-tasks"></i> Base URL</label>
22         <input type="text" id="node-input-baseurl" placeholder="http(s)://url">
23     </div>
24     <div class="form-row">
25         <label for="node-input-append"><i class="fa fa-tasks"></i> Append</label>
26         <input type="text" id="node-input-append" placeholder="">
27     </div>
28     <div class="form-row">
29         <label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
30         <input type="text" id="node-input-name" placeholder="Name">
31     </div>
32     <div class="form-tips">The <b>Base URL</b> gets prepended to whatever payload is passed in. Leave blank if you pass in a full url.<br/>The append gets added to the end after any payload.<br/>The output Topic is the same as the input Topic.</div>
33 </script>
34
35 <script type="text/x-red" data-help-name="httpget">
36         <p>Performs an HTTP or HTTPS GET and returns the fetched page.</p>
37         <p>The return code is placed in <b>msg.rc</b>, and the full text of the result is in <b>msg.payload</b>.</p>
38         <p>The <b>msg.payload</b> is added to the base url, and then the optional append is added after.</p>
39         <p>This is mostly suitable for small pages as large results will need a lot of parsing....</p>
40 </script>
41
42 <script type="text/javascript">
43     RED.nodes.registerType('httpget',{
44         category: 'deprecated',
45         color:"rgb(231, 231, 174)",
46         defaults: {
47             name: {value:""},
48             baseurl: {value:""},
49             append: {value:""}
50         },
51         inputs:1,
52         outputs:1,
53         icon: "white-globe.png",
54         label: function() {
55             return this.name||this.baseurl;
56         },
57         labelStyle: function() {
58             return this.name?"node_label_italic":"";
59         }
60     });
61 </script>