Home >Web Front-end >JS Tutorial >FooApi Updates: Your All-in-One Fake API

FooApi Updates: Your All-in-One Fake API

Barbara Streisand
Barbara StreisandOriginal
2025-01-29 10:31:09180browse

FOOAPI update: new national geographical data and custom MOCK features!

Hi everyone! ?

This is the second article about FOOAPI published on Dev.to. FOOAPI is my personal project, which aims to quickly and easily provide test data and different data operation methods in one place. Here, you can find methods such as universal data, geographical data, images, and REST and GraphQL.

FOOAPI provides a variety of types of authentic simulation data:

  • User?
  • Product?
  • Article?
  • Comments 🎜️
  • To do it ️
  • Picture? ️
  • Movie? ️
  • Song?
  • City? (Geojson)
  • New features: National Geographic Data (Geojson Geometric Figure)? ️
  • Now you can retrieve national geometric geometric data through endpoints. All data follow the Geojson format specification. The available endpoints and examples are listed in the document:

In addition, I also added POST, PUT, PATCH, and Delete endpoints to urban data sets. You can freely explore and use these endpoints to simulate your geographical application.

Custom Mock function? /api/countries /docs/countries

You can now create a custom Mock endpoint! Fooapi.com/docs/mock How to use as follows:

FooApi Updates: Your All-in-One Fake API You can define the Request method

,

status code

and

response body , FOOAPI will create a endpoint and a custom ID (such as FOOAPI. COM/CUSTOM/ABCD1234

), and then you can send a request and test your custom response.

This end point expires after 1 hour, and then you need to create a new endpoint. During this period, you can edit the last end point by simply updating the value in the UI and click "Update Point". This is a preliminary version. Welcome to share your suggestions in the comments to make it better! Example:

    Browser test:
  • Please have a cup of coffee! 🎜️

I have created an account in buymeacoffee.com. If you want to support this project, you can donate here: buymeacoffee.com/carban donation will be used to maintain and improve the project.

thanks

FooApi Updates: Your All-in-One Fake API In the end, I want to thank @urbanisierung, my

FOOAPI

is included in the #66 news and communication of Weeklyfoo.com. There, you can find many excellent tools like me, as well as articles, news, tutorials and video recommendations.

The above is the detailed content of FooApi Updates: Your All-in-One Fake API. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn