import requests
import json
URL = 'http://localhost:8000/studentapi/'


def update_data():
    data = {'id': 5, 'name': 'Patel', 'roll': 104, 'city': 'Balinagar'}
    json_data = json.dumps(data)
    headers = {'content-Type': 'application/json'}
    res = requests.put(url=URL, headers=headers, data=json_data)
    json_data = res.json()
    print(json_data)


update_data()

ca3cb2fe3c4d1d42f5ab64ca310d79065305f9f7
<mask token>


def update_data():
    data = {'id': 5, 'name': 'Patel', 'roll': 104, 'city': 'Balinagar'}
    json_data = json.dumps(data)
    headers = {'content-Type': 'application/json'}
    res = requests.put(url=URL, headers=headers, data=json_data)
    json_data = res.json()
    print(json_data)


<mask token>

<mask token>


def update_data():
    data = {'id': 5, 'name': 'Patel', 'roll': 104, 'city': 'Balinagar'}
    json_data = json.dumps(data)
    headers = {'content-Type': 'application/json'}
    res = requests.put(url=URL, headers=headers, data=json_data)
    json_data = res.json()
    print(json_data)


update_data()

<mask token>
URL = 'http://localhost:8000/studentapi/'


def update_data():
    data = {'id': 5, 'name': 'Patel', 'roll': 104, 'city': 'Balinagar'}
    json_data = json.dumps(data)
    headers = {'content-Type': 'application/json'}
    res = requests.put(url=URL, headers=headers, data=json_data)
    json_data = res.json()
    print(json_data)


update_data()

import requests
import json
URL = 'http://localhost:8000/studentapi/'


def update_data():
    data = {'id': 5, 'name': 'Patel', 'roll': 104, 'city': 'Balinagar'}
    json_data = json.dumps(data)
    headers = {'content-Type': 'application/json'}
    res = requests.put(url=URL, headers=headers, data=json_data)
    json_data = res.json()
    print(json_data)


update_data()
