Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Unlocking net/http APIs (Kaylyn Gibilterra 2019)

Unlocking net/http APIs (Kaylyn Gibilterra 2019)

Avatar for GopherConAU

GopherConAU

October 31, 2019
Tweet

More Decks by GopherConAU

Other Decks in Programming

Transcript

  1. Part 1 - Basic API Part 2 - Building a

    Router Part 3 - Router Extensions
  2. 0.

  3. Things I could talk about: • Building an API ◦

    Handlers ◦ ListenAndServe ◦ Mux & routing ◦ Request ◦ Restricting Methods ◦ Response ◦ Parsing a request: ▪ Json unmarshal ▪ Reading a body • Calling an API ◦ Client: https://medium.com/@nate 510/don-t-use-go-s-default- http-client-4804cb19f779 ◦ Server • Transport - TLS, setting proxies • CORS • Interfaces • Context • Middleware • Testing • http.Error maybe?