fc_edit.py
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
@Time : 2021/7/30 9:55
@Auth : wlm
@File :fc_edit.py
@IDE :PyCharm
"""
from commons import common as com
from commons.MySession import my
class fc_edit():
url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/add.action"
header = {
"Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "148",
"Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
"X-Requested-With": "XMLHttpRequest",
"User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", "Accept-Language": "zh-CN,zh;q=0.9",
"Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
"Accept-Encoding": "gzip,deflate",
"Cookie": "UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5;\
UAP_firmId=9;\
UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NzAyMzUsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIn0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NzIwMzUsImlhdCI6MTYyNzg3MDIzNSwianRpIjoiNDc3MDU5N2YtMGRjZi00OGIwLTg5YjQtNmVhODFiZjVhNTJjIn0.nso2DlyjXlOnwFp5D-N9jvyEKHJJ76K-BIzTdT-1UQAbqKD_9m4ZKXESxh-9333GWtYHORsnbav6MXI6h1Si4Ee_6rxB1DrkqxXoohavvAPutNr5byXjIUejLfFv_YTyCuXCkjiSCUlribURiqG_jKccr5BfIVUigSLkB9ff3f4"
}
body = "id=40&name=农交&mobile=18828281176&cardNumber=888810054630&\
relationCardTemp=210720133001&relationalCard[0].cardNumber=210720131533"
def __init__(self):
self.url = fc_edit.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
self.header = fc_edit.header
self.body = fc_edit.body
fc=fc_edit()
print(fc.body)
re=my.post(url=fc.url,data=fc.body.encode('utf-8'),headers=fc.header)
print(re.json())
print(re.headers)