Giter Site home page Giter Site logo

onepiece's Introduction

PythonServer


Part A Implement state using cookies.

When the browser sends a GET request to the /welcome URL (e.g. http://localhost:8080/welcome) the server checks for cookie header. In case when there is no cookie header (e.g. new user with empty browser cache) the server should respond with a simple HTML page (index.html) with a single text input box to read the username and a submit button

When the user clicks the submit button, it should send the form data to /submit URL using GET method. The server should serve a simple welcome message with the user’s name on it, and set a cookie to remember the user.

Subsequent visits by the same user to the /welcome URL should display the welcome message with that user’s name

Part B Implement a password protected website using the basic access authentication scheme.

When the browser sends the initial GET request, the server check for authentication credentials in the headers and respond with a suitable HTTP status code requesting for authentication credentials using the basic access authentication.

When the browser sends the authentication credentials, the server checks the headers and serves the requested content if the authentication credentials match. Set the authentication credentials for your website to be your ID number:

onepiece's People

Contributors

junhott avatar

Watchers

 avatar

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.