Saturday, 9 February 2013

What does the .html() FluentSharp Extension Method does

Well it gets the HTML code of a particular URL :)

And it does the same thing as the FluentSharp BCL's  .GET() extension method.

Here is a script that shows both in action:
var topPanel     = panel.clear().add_Panel();
var codeViewer1  = topPanel.add_SourceCodeViewer();
var codeViewer2  = codeViewer1.insert_Right().add_SourceCodeViewer();

var url          = "";
var htmlCode     = url.html();
var getCode      = url.GET();


return htmlCode == getCode;

This script (using the O2 Platform’s C# REPL) will create two source code viewers (side by side) and will show the content’s of both .html() and .GET() inside it, the return value confirms that they are the same:


Interestingly,’s response is unique (note the return value):