How would you create an HTTP request to store and retrieve a key-value pair in a backend service?
Implement a function that builds request specifications without sending them. The store request must use PUT, JSON-encode the value, and URL-encode the key. The retrieve request must use GET and the same encoded resource URL.
build_requests(base_url, key, value) receives a base URL, a string key, and a JSON-compatible value. Return a dictionary containing store and retrieve request specifications with method, url, headers, and body fields.
base_url is a non-empty string containing the scheme and hostkey is a non-empty stringvalue is JSON-compatibledef build_requests(base_url, key, value):