Code Room
Code reviewEasycr-g597
Subject Http status ignoredLevel Mid–Senior~14 minCommon in Networking & APIs · Code quality & review interviewsIndustries Software development, Technology

Question

Review this Python function that posts an order to an API.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewpython
import requests, json def submit_order(order):    resp = requests.post(        "https://orders.internal/api/orders",        json=order,        timeout=10,    )    return json.loads(resp.text)
Run or narrate your approach, then ask the coach.