3
Param verileriyle Python İstek Yazısı
Bir API çağrısı için ham istek budur: POST http://192.168.3.45:8080/api/v2/event/log?sessionKey=b299d17b896417a7b18f46544d40adb734240cc2&format=json HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/json Content-Length: 86 Host: 192.168.3.45:8080 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) {"eventType":"AAS_PORTAL_START","data":{"uid":"hfe3hf45huf33545","aid":"1","vid":"1"}}""" Bu istek başarılı (2xx) yanıt döndürüyor. Şimdi bu isteği kullanarak göndermeye çalışıyorum requests: >>> import requests >>> headers = {'content-type' : 'application/json'} >>> data ={"eventType":"AAS_PORTAL_START","data{"uid":"hfe3hf45huf33545","aid":"1","vid":"1"}} …