python flask编写一个http的接口服务
代码语言:python
所属分类:其他
代码描述:python flask编写一个http的接口服务
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
#!/usr/local/python3/bin/python3 # -*- coding: utf-8 -* import io import sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') import random import re import time import requests import flask,json from flask import request server = flask.Flask(__name__) @server.route('/register',methods = ['get','post']) def reg(): dict = {} data = json.loads(request.get_data()) print(data) vehicle_model = data.get('vehicle_model') vehicle_parts = data.get(.........完整代码请登录后点击上方下载按钮下载查看
网友评论0