RapidAPI Profile picture
Mar 24 โ€ข 13 tweets โ€ข 3 min read
Let's discuss the correct flow of an HTTP session.

A Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
In HTTP protocol, a typical session has three phases:

โ€ข Establishes a TCP connection
โ€ข Client sends an HTTP request
โ€ข Server sends an HTTP response
๐Ÿ“Œ Establishing a connection

The client establishes the connection with the server using the TCP layer.

Default HTTP port with TCP layer is 80 but other ports might be used as well.
As the 80 port number is the default for the HTTP protocol, so adding it with the domain is not mandatory.

For example,

RapidAPI.com/hub and RapidAPI.com/hub are the same things.

But RapidAPI.com:8080/hub is different.
๐Ÿ“Œ HTTP Request

After a successful connection, the client can ask for data from the server.

User-agent (mostly web browsers) can send HTTP requests and ask for the necessary data.
A typical HTTP request contains three things:

- Request methods
- HTTP headers
- Method body (optional)
There are request methods that clients can use to perform various operations.

๐Ÿ“Œ HTTP Response

The third and final step in the HTTP session is handled by the server, and that is HTTP response.
After the client sent the request, the server process it and sends the response accordingly.

Server always returns a response doesn't matter request is successful or not.
How does a client know that the request is successful or not?

This is where HTTP status codes come into play.

They are predefined codes according to the response.

The structure of the HTTP response looks like this:

โ€ข Status line
โ€ข Response header
โ€ข Message body (optional)
Check out this thread for HTTP headers:

And that's pretty much it for this thread.

Follow @Rapid_API for more exclusive content. ๐Ÿ’™๐Ÿ™

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with RapidAPI

RapidAPI Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Rapid_API

Mar 25
Do you know what HTTP Cookies are and what they do?

Find out in this RapidAPI Comic.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป

{ 1 / 5 } What are HTTP Cookies comic...
{ 2 / 5 } What are HTTP cookies descr...
{ 3 / 5 } Description of HTTP cookies...
Read 5 tweets
Mar 25
What exactly is curl.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
curl is nothing but a command-line tool that provides a more programmatic way to interact with APIs.
cURL stands for client URL.

It is used to establish communication between the client and the server.

You can fetch data and transfer data to the server using curl.
Read 15 tweets
Mar 25
What is a Web API and how do they differ from a REST API?

A Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
We can use Web APIs while developing a website.

It provides functionalities that we can use to add more features to our website.

Web APIs are primarily used with JavaScript though this is not always the case.
Web APIs can be accessed over the web using the HTTP protocol.

As server API is used to enhance the functionality of the server, similar Web APIs enable developers to build a web app that can reach a wide range of clients.
Read 10 tweets
Mar 24
Five free project-based courses for web developers.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
1๏ธโƒฃ Build and sell your own API

Make a profitable API from scratch and sell it on the RapidAPI Hub.

๐Ÿ”— RapidAPI.com/courses/build-โ€ฆ
2๏ธโƒฃ Build and Deploy a Google Maps Travel Companion Application

A great tutorial on building and deploying a Google Maps Travel Companion App using a free API available on RapidAPI.

๐Ÿ”— RapidAPI.com/courses/build-โ€ฆ
Read 7 tweets
Mar 24
Do you know the anatomy of an API request?

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿผ
There are four main components:

Method
Endpoint
Header
body/data
๐Ÿ“Œ Method

The Method is the type of request sent to a server, such as GET, POST, PUT, PATCH, and DELETE.

These requests are used to create four types of actions for data in the server. These actions are Create, Read, Update, and Delete (CRUD).
Read 7 tweets
Mar 23
What exactly is an HTTP cache.

Thread ๐Ÿงต๐Ÿ‘‡๐Ÿป
An HTTP cache is crucial for making your website fast.

Most websites you visit fetch data from the backend to display it on the web page.

Continuous calls to the server can make your website slow and hence worst User Experience.
This is where cache comes into the picture.

Cache is a technique using which the browser can store the resources in the local storage, reducing the number of round trips to the server.
Read 14 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(