my PATCH /todos/:id.json fails with 401 Unauthorized
Angular service methods:
update(id: string, body: Partial<ITodoBase>) {
console.log('Service updates id', id, 'with', body);
const url = `https://my.api.mockaroo.com/todos/${id}.json?key=MYKEYHERE&__method=PATCH`;
return this.http.get<ITodo>(url);
}
PATCH ednpoint
schema "Todos"
data = generate 1
data['text'] = entity['text']
data['title'] = entity['title']
data
As I understand, even though we aim to PATCH, we actually mock it and send a GET request, right?
What could I be doing wrong?
Best regards,