A functional wrapper around the new WCF Web APIs (http://wcf.codeplex.com/). Composition is achieved through the use of the HttpRequestMessage -> Async
Posted: 13 years ago by Ryan Riley
The snippet declares a helper for creating asynchronous controllers for ASP.NET MVC 3. It declares a new base class for asynchronous actions that exposes a computation builder for writing actions using F# asynchronous workflows.
8 people like thisPosted: 13 years ago by Tomas Petricek
The snippet overrides default AsyncControllerActionInvoker so F# async workflows can be used for ASP.NET MVC 3. It declares a new base class for asynchronous controller. Controller method has to have return type Async
Posted: 13 years ago by Dmitry Morozov
A script that consumes the Stackoverflow API in a dynamic fashion
6 people like thisPosted: 12 years ago by Mauricio Scheffer
The Nancy web framework parses URLs for you, and passes requests under a given URL route and HTTP method to your program. It relies heavily on C# dynamic objects; these don't translate well in F# code, and it's easy to make mistakes that only show up at run time. Here we define one F# record type for each route, with an attribute that defines the URL, with placeholders for each field in the record. These types implement one generic interface for each HTTP method they support: for GET, PUT and POST, these generic interfaces also specify the types of the HTTP request and response bodies.
5 people like thisPosted: 11 years ago by Tim Robinson
This is a small example of invoking Win32 API. It gets the url which is opened by Google chrome's main window.
3 people like thisPosted: 11 years ago by nagat01
Simplistic helpers for formatting dates and strings in a web server (strip HTML tags when reading RSS feeds, nicely format dates etc.)
2 people like thisPosted: 9 years ago by Tomas Petricek
This function compiles an F# quotation to a JavaScript string, or prints errors to stderr and returns None on failure.
4 people like thisPosted: 9 years ago by Loïc `Tarmil` Denuzière
HttpListener + FParsec + Pattern Matching = Simple REST Endpoints
3 people like thisPosted: 9 years ago by Ted Cackowski Jr
Simple HTTP server, runs on .Net Core, .Net or Mono, and serves GET requests via a handler. The example given serves up static content from a specified directory.
7 people like thisPosted: 8 years ago by Phillip Trelford
To get a fast feedback loop going with web apps, you can run your experiments using the fsi, starting and restarting the web server each time without having to go through a slow msbuild cycle.
4 people like thisPosted: 6 years ago by Chui Tey
Send file via HTML5 with a XMLHttpRequest to WebSharper Sitelet
0 people like thisPosted: 5 years ago by giuliohome
Based on Tomas Petricek's: http://fssnip.net/a7 .
Shows how to handle non OK (200) response codes, where .Net raises an exception upon GetResponse(), which makes it difficult to recover further error information. Here the snippet shows how to handle errors wrapping a Result
Posted: 4 years ago by Joan Arnaldich
This snippet features an F# Web crawler that i'm already using in 2 applications (slightly modified). It's based on a scalable network of communicating agents that follow URLs extracted from HTML pages until reaching the specified limit.
8 people like thisPosted: 3 years ago by Taha Hachana
The snippet extends a web crawler from snippet http://fssnip.net/3K. It synchronizes all printing using an additional agent (so printed text does not interleave) and the crawling function returns an asynchronous workflow that returns when crawling completes.
0 people like thisPosted: 1 year ago by Tomas Petricek
F# module to return historical EOD: open | high |low | close | volume quotes from Yahoo. Single day requests only. DataContract provided on the result record for easy serialization.
16 people like thisPosted: 13 years ago by akaPhenom
This sample implements "Hello, world!" as a WebSharper application. It demonstrates how to compose HTML/XML using combinators, how to dynamically create a button with a handler and how to update an existing DOM element.
4 people like thisPosted: 13 years ago by Tomas Petricek
The snippet shows how to send HTTP POST request to a web page and download the generated HTML result. The POST data is encoded as a byte array and written to the request stream of HttpWebRequest.
10 people like thisPosted: 12 years ago by Tomas Petricek
This snippet automatically speeches text of question,answers and comments in a Stackoverflow article. It requires HtmlAgilityPack(available from Nuget package manager).(Attention: You need reset F# interactive to stop the speech)
6 people like thisPosted: 12 years ago by nagat01
Query google.com (in english) without using any API key with the default WebClient class We are also instrumenting google ability to search between certain time period example: querygooglen 500 3000 "F#" 30 Here you fetch for 500 urls (we are grabbing 100 urls by query on google) wait between each query to google.com for 3 seconds you are seeking for the keyword "F#" you only want results who are at least newer than 30 days ago -Nicolas http://hackeratwork.com/
2 people like thisPosted: 11 years ago by Nicolas Dirand
For example executable, install NPM and stylus package.
0 people like thisPosted: 10 years ago by Sergey Kaspar
Example of integrating DotLiquid with a simple Suave server. The snippet automatically registers all public members of a record as members that can be accessed by DotLiquid templates.
5 people like thisPosted: 9 years ago by Tomas Petricek
Barebone Reactive Extensions web server demo.
7 people like thisPosted: 9 years ago by Giacomo Stelluti Scala
A sitemap-based url tester that runs in parallel.
43 people like thisPosted: 13 years ago by Ryan Riley
Simple OWIN Self-Host web-server with static files support and request deflate/gzip compression.
3 people like thisPosted: 8 years ago by Tuomas Hietanen
Bit like http://www.fssnip.net/a7 but send as async.
3 people like thisPosted: 6 years ago by Tuomas Hietanen
An abstract remoting server API and an abstract web reactive client to call it
0 people like thisPosted: 5 years ago by giuliohome
Needed to receive an OAuth 2 response so used simple http listener
3 people like thisPosted: 3 years ago by Ivan Rainbolt
Demonstrates the minimum references required to run an AspNet.Core web server in F# script
4 people like thisPosted: 3 years ago by Chui Tey