API endpoint only for GET request - dedicated API endpoint


being beginner in IT and ERPNext, just wanted to know after creating GET request (eg : > > @frappe.whitelist(allow_guest=True)

def get_item(item=None):
if item:

Item = frappe.db.get_value(‘Item’, item, [‘name’, ‘owner’])

Item = frappe.db.get_value(‘Item’, item, ‘name’)
Item = frappe.db.get_all(‘Item’, fields=[‘*’])

return Item

i’m getting the data but using the same endpoint for POST request, still getting the data… so my query here : IS THERE ANY METHOD/PERMISSION mechanism WHERE I CAN RESTRICT and not getting data while using POST API endpoint in postman

I tried using @frappe.whitelist(allow_guest=True, request_method="GET")
but didn't work

@frappe.whitelist(allow_guest=True, methods=“GET”)