<s> import requests <EOL> import json <EOL> import sys <EOL> import conn <EOL> import os <EOL> os . system ( '<STR_LIT>' ) <EOL> headers = conn . headers <EOL> auth = conn . auth <EOL> payload = { <EOL> "<STR_LIT>" : True , <EOL> "<STR_LIT>" : <NUM_LIT> <EOL> } <EOL> url = conn . url + '<STR_LIT>' <EOL> def get ( ) : <EOL> print '<STR_LIT>' <EOL> r = requests . get ( url , auth = auth ) <EOL> if r . status_code == <NUM_LIT:200> : <EOL> result = json . loads ( r . text ) <EOL> for items in result : <EOL> print items , '<STR_LIT::>' , result [ items ] <EOL> print '<STR_LIT>' <EOL> else : <EOL> print '<STR_LIT>' <EOL> def put ( ) : <EOL> r = requests . put ( url , auth = auth , data = json . dumps ( payload ) , headers = headers ) <EOL> if r . status_code == <NUM_LIT:200> : <EOL> print '<STR_LIT>' <EOL> else : <EOL> print '<STR_LIT>' <EOL> def post ( ) : <EOL> print '<STR_LIT>' <EOL> def delete ( ) : <EOL> print '<STR_LIT>' </s>
