Start an HTTP server in the terminal and write a program to query an endpoint.
Implement query_endpoint(path, body, status, content_type) so it starts a local server, sends one HTTP request, and returns {"status": number, "body": value}. JSON responses must be decoded into Python values, while non-JSON responses remain strings. The function must also return response bodies for non-2xx status codes.
path is a valid local URL path beginning with /.body is JSON-serializable when content_type contains application/json.status is an integer from 100 through 599.content_type is a valid HTTP media type.def query_endpoint(path, body, status, content_type):