This line:
func createTask(_ task: Task) async throws -> Task { if let url = URL(string: "(baseURL)/todos"){
isn't in the formatted code block. Please, when you make a post, please check that your formatting is correct. If it isn't, just edit it and correct it.
Anyway:
func createTask(_ task: Task) async throws -> Task { if let url = URL(string: "(baseURL)/todos"){
is wrong. You need a \ before (baseURL)
Why are you relying on some AI trash app to figure out such a simple bit of coding? Spend a few minutes and learn how to write a POST request using actual sources of information. This Claude thing isn't going to replace actual knowledge. The very fact that you've had to ask us humans kinda proves that.
Topic:
Safari & Web
SubTopic:
General
Tags: