Put the book down

Report a typo

You were asked to build a simple library API using Flask. After finishing up the project, you've noticed that you've made some mistakes in the author names. To correct those mistakes, you need to create a PUT request that accepts JSON with the new author name and then updates the library:

URL Method Description
/book/<book_title> PUT Updates one book

Use request.json['Author'] to get the new author name

Return only the updated book info, not the whole library
Write a program in Python 3
app = Flask(__name__)
books = [{
"Title":"Childhood",
"Author":"Dostoevsky"
},
{
"Title":"Amerika",
"Author":"Kafka"
}]

class Book(MethodView):
#put your code here
___

Create a free account to access the full topic