Snippets tagged http

  • Parse HTTP chunked response

    Code to parse HTTP chunked response, to use as a client to a Comet server who uses chunked encoding to transfer real time notification data

    2 people like this

    Posted: 6 years ago by Ankur Dhama

  • Synchronous, event-based and asynchronous HTTP proxy

    This snippet shows the implementation of three HTTP proxy servers in F#. The first is written using simple synchronous style (that isn't scalable). The second version uses event-based approach in the Node.js style, but is difficult to write. The third version uses F# async workflows and is both scalable and easy to write.

    7 people like this

    Posted: 5 years ago by Tomas Petricek

  • Caching agent

    Agent that keeps a cache of web pages that were downloaded previously. The agent handles messages to add and get data as well as message to clear the cache.

    3 people like this

    Posted: 5 years ago by Tomas Petricek

  • Async HTTP server

    Creating an asynchronous HTTP Server in F#.

    6 people like this

    Posted: 4 years ago by Julian Kay

  • How to send SMS using ASP.NET through HTTP (C#)

    Hello Guys, This short ASP.NET code snippet is intended to provide you a brief review on how to add SMS functionality to your website. You will see, this is a very simple but smart solution. This ASP.NET application is able to send messages by using HTTP requests towards the SMS gateway that sends the SMSs to the destination telephone via a GSM modem or an IP SMS connection. Let’s take a quick look at the software requirements that are essentially needed for tjis solution. In order to send SMS messages from your ASP.NET application, you need a development platform, e.b Visual Studio, of course, .NET Framework 4.0, Internet Information Services (IIS) and an SMS gateway (I used Ozeki NG – http://www.ozekisms.com). You also need a GSM modem attached to your PC or an IP SMS connection to be able to send messages. Okay and now let’s use the code snippet! Copy the content of smssend.aspx and smssend.aspx.cs into the main directory of the IIS server - C:\Inetpub\wwwroot\ directory (). Configure the fixed data in the smssend.aspx.cs file (the IP address and port number of the SMS gateway, username, password). Launch your SMS gateway Server. Start a web browser and enter this URL: http://127.0.0.1/smssend.aspx - where 127.0.0.1 means that the smssend.aspx and smssend.aspx.cs files can be found on the same computer on which the browser has been opened). Fill in the required fields, and then click the Send button. It’s as easy as that! Happy coding! :)

    2 people like this

    Posted: 2 years ago by Aarav Gupta

  • Simple HTTP Server

    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.

    4 people like this

    Posted: 10 months ago by Phillip Trelford

  • Start Suave server on first free port

    This looks for the first available port and starts a Suave server on the port. The function is asynchronous and returns the port once the server is started.

    3 people like this

    Posted: 9 months ago by Tomas Petricek