Skip to content

Fix the week_1 http server section #2

@barneymorris

Description

@barneymorris

At week_1/http/cmd/http_client/main.go
this line

getPostfix  =  "/notes/%d"

has to be

getPostfix  =  "/notes/{id}"

because otherwise each time you client call the server it always get 404.

From go-chi docs:

// Regexp url parameters:
r.Get("/{articleSlug:[a-z-]+}", getArticleBySlug)                // GET /articles/home-is-toronto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions