Update the function updateUserProfile
to update the profile of an existing user using the endpoint https://jsonplaceholder.typicode.com/users/<id>
. The function accepts the id
of the user and an object containing the updated name
, username
, and email
.
Log the updated user profile received back to the console with the prefix Updated User Profile: if the request is successful. If the response is not OK, log the message Network response was not ok. to the console at the error level. If the request fails, log the error message in the format Error updating user profile: <error message>