Created
April 11, 2017 19:50
-
-
Save anonymous/f85155085729f39e2a63f6c90ecf1837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace com.ibm.streamsx.inet.http.sample; | |
use com.ibm.streamsx.inet.http::*; | |
/** | |
* This sample connects to the specified URL and prints the streaming data. | |
*/ | |
public composite HTTPStreamSample | |
{ | |
graph | |
stream<rstring data> Result = HTTPGetStream() | |
{ | |
param | |
url : getSubmissionTimeValue("url"); | |
} | |
() as Writer = Custom(Result) | |
{ | |
logic | |
onTuple Result: | |
{ | |
println("result: " + (rstring)Result + "\n"); | |
rstring url = "https://bi-hadoop-prod-4015.bi.services.us-south.bluemix.net:8443/gateway/default/hbase"; | |
list<rstring> headers= []; | |
mutable int32 err = 0; | |
rstring res = httpGet(url, headers, "ndsilva", "biclusterpassw0rd",err); | |
printStringLn(res); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment