dealContentType.py 399 Bytes
# -*- coding: utf-8 -*-

# @Time    : 2021/7/16 14:51
# @Author  : Ljq
# @File    : dealContentType.py
# @Software: PyCharm

"""
    用于hearders中Content-Type格式处理
"""

def jsonCode(headers={}):
    headers["Content-Type"] = "application/json; charset=UTF-8"
    return headers

def urlCode(headers={}):
    headers["Content-Type"] = "application/x-www-form-urlencoded"
    return headers