Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@RobynLlama RobynLlama released this 06 Feb 04:07
· 3 commits to main since this release
3cbcf64

New in 0.3.0

Listener Model changed to HTTPListener

  • Now uses an HTTPListener instead of a TCPListener
  • Program loop is now entirely async, old loop removed
    • Clients are accepted as they come
    • Requests are handled as they come
    • Old Client model removed
    • Old RequestInfo model removed

Webpage Interop modified

  • breaking!: IScriptPage now conforms to CreatePage(HttpListenerRequest request);

Extension methods / helpers added for parsing GET and POST arguments

Example usage available here

  • SharpWebserver.Extensions
    • GET Methods:
      • GetFirstOrDefault for keyname
      • GetFirstOrDefaultForAll for all keys
    • POST Methods:
      • GetDecodedFormData for all application/x-www-form-urlencoded
      • GetDecodedFormDataFirstOrDefault for all application/x-www-form-urlencoded

Example Pages

  • Added example solution
  • Updated all Examples to conform to the new Interop
  • Updated Index.cs to use the new extension methods and retrieve both GET and POST data

Full Changelog: v0.2.0...v0.3.0