Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Postman and Insomnia | Endpoints with Blueprints and MethodView
Professional Web API with Flask
course content

Зміст курсу

Professional Web API with Flask

Professional Web API with Flask

1. Introduction to the Course
2. Database and Models
3. Flask-Smorest and Schemas
4. Endpoints with Blueprints and MethodView
5. Authentication with JWT
6. Deployment

bookPostman and Insomnia

Firstly, in the preceding chapter, we initiated a relaunch of our project due to the integration of changes and the introduction of new endpoints. To automate this relaunch process, we plan to incorporate a series of script lines into a newly created '.flaskenv' file located at the project's root.

Before diving into the specifics of JSON, let's acquaint ourselves with Postman and Insomnia, two pivotal tools for API development and testing.

Postman

Postman stands out as an essential platform for developers working with APIs. This tool, known for its interactive and automated capabilities, simplifies the process of testing API services. Catering to a wide range of users, from individual developers to extensive teams, Postman provides a user-friendly interface that enables the sending of requests to web servers and the inspection of responses. Its features include:

  • The creation and sharing of request collections among team members;
  • A built-in suite for automated testing, allowing for the execution of complex request sequences;
  • Tools for the easy generation and dissemination of API documentation.

To integrate Postman into our project, follow these steps:

  • Sign up for a free account.
  • Download the Desktop Agent.

Experiment with sending your first GET request through Postman. Enter your URL (in my case http://127.0.0.1:5000/clubs) and hit Send. By default, the GET method is selected. You should expect to receive a response with the status '200 OK'. Save this request under the name 'clubs' within the 'fc_manager_api' collection, for instance.

To initiate a new request, click on the plus sign to open a new tab where you can save additional requests. Given that our app currently has only one defined endpoint, attempting to access other endpoints or methods will likely result in errors (404).

Acquiring proficiency in Postman will not only enhance your skill set but also serve as a valuable addition to your resume.

Insomnia

Insomnia is another tool offering functionality and an interface akin to Postman's, tailored for desktop use. It provides excellent options for quick API testing, requiring minimal setup, making it ideal for those new to the field.

Our focus will be on mastering these tools, given their collaborative features and suitability for both large and small projects.

Note

Dive into the world of HTTP requests and responses with this insightful article. Just remember, keep your learning journey focused and on track! 😉

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 4. Розділ 4
We're sorry to hear that something went wrong. What happened?
some-alt