About Internet protocol, HTTP methods, Status codes

5/5 - (1 vote)

Internet protocol

The payload part of IP packets supports multiple protocols to make sure that information arrives as expected.

Two of these are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).TCP is used for data that must arrive correctly and in order.

This is because TCP can deal with data packets arriving out of order, becoming damaged or corrupted, or dropped or lost albeit at the cost of a small delay.

HTTP protool

HTTP is a core operational protocol of the world wide web.
It is what enables your web browser to communicate with a web server that hosts a website.

HTTP is used for transferring web resources such as HTML documents, images, css styles, and other files.

HTTP is a request response based protocol.

A web browser or client sends an HTTP request to a server and the web server sends the HTTP response back to the browser.

Https protocol

HTTPS is the secure version of HTTP. It is used for secure communication between two computers using encryption.

The big difference between HTTP and HTTPS is that before the content is sent, it is turned into a secret code.

Only the receiving computer can turn the secret code back into its original content.
If someone else intercepts the code, the code wouldn’t be understandable.

HTTP methods

HTTP methods are, GET, POST, PUT, and DELETE.

The GET method is used to retrieve information from the server.

The POST request is used to send data to the server.

The PUT method updates the existing data on the server.

The DELETE method removes the resource.

The path is the representation of where the resource is stored on the web server.

There are multiple versions of the HTTP protocol: Versions 1.1 and 2.0 are the most used.

Headers

Headers contain additional information about the request and the client that is making the request.

A header is a case-insensitive name followed by a: and then followed by a value.

Common header

Common headers are:

The Host header specifies the host of the server and indicates where the resource is requested from.

The User-Agent header informs the web server of the application that is making the request.
It often includes the operating system (Windows, Mac, Linux), version and application vendor.

The Accept header informs the web server what type of content the client will accept as the response.

The Accept-Language header indicates the language and optionally the locale that the client prefers.

The Content-type header indicates the type of content being transmitted in the request body.

HTTP Request Body

HTTP requests can optionally include a request body.
A request body is often included when using the HTTP POST and PUT methods to transmit data.

Http Responses, Status codes

HTTP responses follow a format similar to the request format.
HTTP status codes contained within the header indicate if the HTTP request successfully completed.

Status codes

There are five groups of status codes.
They are grouped by the first digit of the error number.

Informationalresponses are grouped 100-199.

Successful responses are grouped from 200-299.
Successful responses indicate that the request was successfully processed by the web server. The most common success response is 200 OK.

Redirection message are 300-399.

Redirection responses indicate to the web client that the requested resource has been moved to a different path.

The most common response codes used are 301 moved permanently and 302 found.

The difference between the redirection messages 301 and 302 is that 302 indicates a temporary redirection.

Client error responses range from 400-499.
Client error responses indicate that the requests contained bad syntax or content and cannot be processed by the server.

The most common codes used are 400 is used when the web browser or client submitted bad data to the web server.

401is used to indicate that the user must log into an account before the request can be processed.

403is used to indicate the request was valid, but that the web server is refusing to process it.

Server error responses are 500-599.
Server error responses indicate that a failure occurred on the server while trying to process the request.

The most common code used is 500 internal server error, which is a generic error status indicating that the server failed to process the request.

502 Bad Gateway – The server received an invalid response from the Application Server.

503 Service Unavailable – The web server cannot process the request.

Other Internet Protocols

Domain Name System Protocol (DNS)

The Domain Name System Protocol DNS checks the DNS server associated with the domain name and then returns the correct IP address.

Internet Message Access Protocol (IMAP)

The purpose of the Internet Message Access Protocol or IMAP is to provide a way to download emails and manage your mailbox on the server storing your emails.

Simple Mail Transfer Protocol (SMTP)

Simple Mail Transfer Protocol, SMTP allows email clients to submit emails for sending via an SMTP server. It can also be used to receive emails from an email client, but IMAP is more commonly used.

File Transfer Protocol (FTP)

When running websites on the Internet, you’ll need a way to transfer the files from your local computer to the server they’ll run on.
The File Transfer Protocol or FTP allows you to list, send, receive and delete files on a server.
The server must run an FTP Server and you will need an FTP Client on your local machine.

Secure Shell Protocol (SSH)

The Secure Shell Protocol, SSH allows you to log in and interact with the computer remotely. Using a SSH client you can connect to an SSH server running on a server to perform commands on the remote computer.
All data sent over SSH is encrypted. This means that third parties cannot understand the data transmitted.

SSH File Transfer Protocol (SFTP)

With FTP the data is transmitted insecurely. This means that third parties may understand the data that you are sending.
The SSH File Transfer Protocol, can be used to transfer files over the SSH protocol.
This ensures that the data is transmitted securely. Most FTP clients also support the SFTP protocol.

Hello there!

I hope you find this post useful!

I'm Mihai, a programmer and online marketing specialist, very passionate about everything that means online marketing, focused on eCommerce.

If you have a collaboration proposal or need helps with your projects feel free to contact me. I will always be glad to help you!

subscribe youtube

Leave a Comment

WebPedia.net