Use vnet to simulate a server that can return json in wifi local area network

Project address: https://github.com/caojianfeng/vnet


inflamed

python httpserver to mock http api server before you have a real one

using

1 start server by run python vnet.py 2 place you json file(ex:"animation") under webbase/gets/v3/app/android/phone/

then you can get http response from http://[your_host:your_port]/v3/app/android/phone/animation

In many cases, server development is slow, so I can’t wait and I need to debug it myself. How to do?

Instructions for use

1 Startup script: python vnet.py 2 Write a json file by yourself and put it in the directory webbase/gets/v3/app/android/phone/

So you can access this script through http://[your_host:your_port]/v3/app/android/phone/animation

Author: [email protected] 

Project address: https://github.com/caojianfeng/vnet


The path behind gets/ can be defined by yourself. If you put a today.json under webbase/gets/weather/, you can pass

http://[your_host:your_port]/weather/today.json to access your data.



Guess you like

Origin blog.csdn.net/windcao/article/details/50425895
Recommended