
Enviado em 10/09/2014 - 11:42h
Pessoal bom dia...
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import requests
>>> import json
>>> req_json = 'http://186.233.128.48/detraf_voxbras/seek/block'
>>> data = requests.get(req_json)
>>> dec = json.loads(data.text)
>>> requests.put(req_json,data=dec[0])
<Response [405]>
Meu json do servidor:
Block List
list all endpoints event block
GET /detraf_voxbras/seek/block/
HTTP 200 OK
Content-Type: application/json
Vary: Accept
Allow: POST, OPTIONS, GET
[
{
"id_block": 1,
"ip_sw": "10.100.0.11",
"mac": "00-01-40-2a-0a-fc",
"date_start_env": "2014-09-09T09:10:01",
"date_end_env": "2014-09-09T09:10:02",
"number_tel": "",
"speed": 1,
"port": 1,
"tag_vlan_data_lan1": "1",
"tag_vlan_data_lan2": "1",
"tag_vlan_data_hpna": "1",
"tag_vlan_voip": "100",
"name_end_point": "teste",
"status_event": "ATIVO"
},
{
"id_block": 4,
"ip_sw": "10.100.0.11",
"mac": "00-01-40-2a-0c-76",
"date_start_env": "2014-09-10T21:36:48",
"date_end_env": "2014-09-15T21:32:42",
"number_tel": "",
"speed": 1,
"port": 2,
"tag_vlan_data_lan1": "2",
"tag_vlan_data_lan2": "3",
"tag_vlan_data_hpna": "4",
"tag_vlan_voip": "5",
"name_end_point": "Silvia Maria Cog",
"status_event": "ATIVO"
}
]
Gentoo: detectando impressoras de rede e como fixar uma impressora por IP
Como o GNOME conseguiu o feito de ser preterido por outras interfaces gráficas
Gentoo binário em 2026: UEFI, LUKS, Btrfs e Systemd
Trabalhando Nativamente com Logs no Linux
Jogando Daikatana (Steam) com Patch 1.3 via Luxtorpeda no Linux
Por que sua empresa precisa de uma PKI (e como automatizar EMISSÕES de certificados via Web API)
Instalando NoMachine no Gentoo com Systemd (acesso Remoto em LAN)
Gentoo: Trocando wpa_supplicant pelo iwd no NetworkManager (Systemd)
O que houve com slackware ??? (12)
Alterar conteúdo de dica [RESOLVIDO] (3)
Vou destruir sua infância:) (5)









