Git Product home page Git Product logo

bookmark-server's Introduction

Bookmark Server

A bookmark server or URL-shortening service, similar to TinyURL.com or goo.gl, but with no persistent storage.

This server will accept a URL and a short name, check that the URL actually works (returns an HTTP 200), then store it in a Python dictionary.

This is a bookmark server or URI shortener, that maintains a mapping (dictionary) between short names and long URIs, checking that each new URI added to the mapping actually works (i.e. returns a 200 OK).

This server is intended to serve three kinds of requests:

  • A GET request to the / (root) path. The server returns a form allowing the user to submit a new name/URI pairing. The form also includes a listing of all the known pairings.
  • A POST request containing "longuri" and "shortname" fields. The server checks that the URI is valid (by requesting it), and if so, stores the mapping from shortname to longuri in its dictionary. The server then redirects back to the root path.
  • A GET request whose path contains a short name. The server looks up that short name in its dictionary and redirects to the corresponding long URI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.