Technical Interview Flashcards
Hypertext Transfer Protocol (HTTP) Requests
- Follows Client/Server Model -or- Request/Response Model: structures requests and responses over the Internet.
- HTTP is Stateless protocol - Independent transactions - like flipping a coin | Web Applications still track your state by means of cookies and sessions.
- Application layer | HTTP uses Transmission Control Protocol (TCP):
- TCP defines how data is transmitted.
- Requests = Specify client actions or methods: GET, POST, DELETE, etc.
- Responses = Server status codes.
GET (HTTP Request)
Retrieves data.
POST (HTTP Request)
Creates a new object, creates something new: - ex: adds a new item to your shopping cart.
HTTP Proxy
- HTTP proxy is an application that runs between the browser and the server, allowing you to intercept, view, and modify HTTP requests and responses.
- Proxy means to act on behalf of another.
URL
- Stands for Uniform Resource Locator = Web Address.
Scheme (URL Structure)
Indicates the protocol that the browser must use to request the resouce (a protocol is a set method for exchanging or transferring data around a computer network). Usually for websites the protocol is HTTPS or HTTP (its unsecured version).
Authority (URL Structure)
Separated from the scheme by the character pattern :// If present the authority includes both the domain (e.g. www.example.com) and the port (80), separated by a colon:
- The domain indicates which Web server is being requested.
- The port indicates the technical “gate” used to access the resources on the web server. It is usually omitted if the web server uses the standard ports of the HTTP protocol (80 for HTTP and 443 for HTTPS) to grant access to its resources. Otherwise it is mandatory.
Path to Resource (URL Structure)
The path refers to the exact location of a page, post, file, or resource on the Web server.
Anchor (URL Structure)
An anchor represents a sort of “bookmark” inside the resource, giving the browser the directions to show the content located at that “bookmarked” spot.
100-199 (HTTP Response Codes)
- Informational responses
The request was received, continuing to process.
200-299 (HTTP Response Codes)
- Successful responses
The request has succeeded. The meaning of the success depends on the HTTP method: - GET: The resource has been fetched and is transmitted in the message body.
- HEAD: The entity headers are in the message body.
- PUT or POST: The resource describing the result of the action is transmitted in the message body.
- TRACE: The message body contains the request message as received by the server.
300-399 (HTTP Response Codes)
- Redirects
Further action needs to be taken in order to complete the request.
400-499 (HTTP Response Codes)
- Client error
The request contains bad syntax or cannot be fulfilled.
500-599 (HTTP Response Codes)
- Server errors
The server failed to fulfill an apparently valid request.
Regular Expressions
- Regular expressions are used to find patterns within text.
- Common Uses of Regular Expressions:
1. Validate text
2. Search through text