Skip to content

Commit

Permalink
Merge pull request #22 from Yasara123/master
Browse files Browse the repository at this point in the history
Update http io sample for text mapper
  • Loading branch information
mohanvive authored Aug 1, 2017
2 parents 2fdfcad + ed62c7d commit 2c9bfc6
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,23 @@ public class HttpClient {
public static void main(String[] args) throws InterruptedException, KeyManagementException {
setCarbonHome();
URI baseURI = URI.create(String.format("http://%s:%d", "localhost", 5005));
String event1 = "John,20,SL";
String event2 = "Mike,20,USA";
String event1 = "name:\"John\",\n" +
"age:20,\n" +
"country:\"SL\"";
String event2 = "name:\"Mike\",\n" +
"age:20,\n" +
"country:\"USA\"";
httpPublishEvent(event1, baseURI, "/inputStream", false, "text"
);
httpPublishEvent(event2, baseURI, "/inputStream", false, "text"
);
Thread.sleep(500);
event1 = "Jane,20,SL";
event2 = "Donna,20,USA";
event1 = "name:\"Jane\",\n" +
"age:20,\n" +
"country:\"India\"";
event2 = "name:\"Donna\",\n" +
"age:20,\n" +
"country:\"Aus\"";
httpsPublishEvent(event1, "https://localhost:8005/inputStream", false,
"text/plain");
httpsPublishEvent(event2, "https://localhost:8005/inputStream", false,
Expand Down

0 comments on commit 2c9bfc6

Please sign in to comment.