SlideShare a Scribd company logo
1 of 20
Download to read offline
Writing HTTP
Middleware In Go
Shiju Varghese
GopherCon India 2016
Agenda
• Introduction to HTTP Middleware
• Writing HTTP Middleware with Negroni
HTTP Handlers
!
!
!
!
!
!
Handlers are responsible for writing headers and bodies !
into HTTP responses. !
!
//	ServeHTTP	should	write	reply	headers	and	data		
//	to	the	ResponseWriter	and	then	return.	
!
type	Handler	interface	{	
				ServeHTTP(ResponseWriter,	*Request)	
}
HTTP Middleware
• Pluggable and self-contained piece of code that
wraps web application handlers.!
• Components that work as another layer in the
request handling cycle, which can execute some
logic before or after executing your HTTP
application handlers.!
• Great for implementing cross-cutting concerns:
Authentication, authorization, caching, logging,
etc. 	
!
Using StripPrefix to Wraps http.FileServer
handler
package	main	
!
import	(	
				"net/http"	
)	
!
func	main()	{	
				//	To	serve	a	directory	on	disk	under	an	alternate	URL	
				//	path	(/public/),	use	StripPrefix	to	modify	the	request	
				//	URL's	path	before	the	FileServer	sees	it:	
!
				fs	:=	http.FileServer(http.Dir("public"))	
				http.Handle("/public/",	http.StripPrefix("/public/",	fs))	
	 }
func	StripPrefix(prefix	string,	h	Handler)	Handler	{	
				if	prefix	==	""	{	
								return	h	
				}	
				return	HandlerFunc(func(w	ResponseWriter,	r	*Request)	{	
								if	p	:=	strings.TrimPrefix(r.URL.Path,	prefix);	len(p)	<	
len(r.URL.Path)	{	
												r.URL.Path	=	p	
												h.ServeHTTP(w,	r)	
								}	else	{	
												NotFound(w,	r)	
								}	
				})	
}
StripPrefix Function
Pattern for Writing HTTP
Middleware	 .	 	
func	middlewareHandler(next	http.Handler)	http.Handler	{	
				return	http.HandlerFunc(func(w	http.ResponseWriter,	r	
*http.Request)	{	
				//	Our	middleware	logic	goes	here	before		
	 	//	executing	application	handler	
								next.ServeHTTP(w,	r)	
				//	Our	middleware	logic	goes	here	after		
	 	//	executing	application	handler	
				})	
}
Writing a Logging Middleware
func	loggingHandler(next	http.Handler)	http.Handler	{	
				return	http.HandlerFunc(func(w	http.ResponseWriter,	r	*http.Request)	{	
!
					 //	Before	executing	the	handler	
!
								start	:=	time.Now()	
								log.Printf("Started	%s	%s",	r.Method,	r.URL.Path)	
								next.ServeHTTP(w,	r)	
!
	 //	After	executing	the	handler	
!
								log.Printf("Completed	%s	in	%v",	r.URL.Path,	time.Since(start))	
				})	
}	
• Parameter of type http.Handler!
• Returns http.Handler type
!
!
func	index(w	http.ResponseWriter,	r	*http.Request)	{	
						fmt.Fprintf(w,	"Welcome!")	
}	
func	about(w	http.ResponseWriter,	r	*http.Request)	{	
						fmt.Fprintf(w,	"About")	
}	
func	main()	{	
				http.Handle("/",	loggingHandler(http.HandlerFunc(index)))	
				http.Handle("/about",	loggingHandler(http.HandlerFunc(about)))	
!
				server	:=	&http.Server{	
								Addr:	":3000",	
				}	
				server.ListenAndServe()	
}
Using the Logging Middleware
Middleware Chaining
http.Handle("/",	middlewareFirst(middlewareSecond(loggingHandler(	
http.HandlerFunc(index)))))
Using HTTP Middleware with
Negroni Package
Install Negroni:!
$ go get github.com/codegangsta/negroni!
Import Negroni package:!
import "github.com/codegangsta/negroni"
//	Handler	handler	is	an	interface	that	objects		
//	can	implement	to	be	registered	to	serve	as	middleware	
//	in	the	Negroni	middleware	stack.	
//	ServeHTTP	should	yield	to	the	next	middleware		
//	in	the	chain	by	invoking	the	next	http.HandlerFunc	
//	passed	in.	
//	
//	If	the	Handler	writes	to	the	ResponseWriter,	the	next	http.HandlerFunc	
should	not	be	invoked.	
type	Handler	interface	{	
				ServeHTTP(rw	http.ResponseWriter,	r	*http.Request,	next	http.HandlerFunc)	
}	
!
//	HandlerFunc	is	an	adapter	to	allow	the	use	of		
//	ordinary	functions	as	Negroni	handlers.	
type	HandlerFunc	func(rw	http.ResponseWriter,	r	*http.Request,	next	
http.HandlerFunc)	
!
func	(h	HandlerFunc)	ServeHTTP(rw	http.ResponseWriter,	r	*http.Request,	next	
http.HandlerFunc)	{	
				h(rw,	r,	next)	
}
Writing HTTP Middleware with
Negroni
func	MyMiddleware(rw	http.ResponseWriter,	r	*http.Request,	next	
http.HandlerFunc)	{	
		//	logic	before	executing	the	next	handler	
		next(rw,	r)	
		//	logic	after	executing	the	next	handler	
}
Mapping Middleware Chaining
with Negroni
func	main()	{	
				mux	:=	http.NewServeMux()	
				//	map	your	routes	here	
				n	:=	negroni.New()	
				//	You	can	map	it	to	the	handler	chain	with	the	Use	function:	
				n.Use(negroni.HandlerFunc(MyMiddleware))	
				n.UseHandler(mux)	
				server	:=	&http.Server{	
								Addr:				":8080",	
								Handler:	n,	
				}	
				server.ListenAndServe()	
}
Register Middleware Handlers for Specific
Routes
router	:=	mux.NewRouter()		
adminRoutes	:=	mux.NewRouter()		
!
//	add	admin	routes	here	
..	.	
!
//	Add	route	specific	Middleware	to	“/admin”	route	
router.Handle("/admin",	negroni.New(	
		Middleware1,	
		Middleware2,	
		negroni.Wrap(adminRoutes),	
))
Applying an Authentication
Middleware into Specific Routes
//	Middleware	for	validating	JWT	tokens	
func	Authorize(w	http.ResponseWriter,	r	*http.Request,	next	http.HandlerFunc)	{	
				//	validate	the	token	
				token,	err	:=	jwt.ParseFromRequest(r,	func(token	*jwt.Token)	(interface{},	error)	{	
!
								//	Verify	the	token	with	public	key,	which	is	the	counter	part	of	private	key	
								return	verifyKey,	nil	
				})	
!
				if	err	!=	nil	{	
								switch	err.(type)	{	
!
								case	*jwt.ValidationError:	//	JWT	validation	error	
												vErr	:=	err.(*jwt.ValidationError)	
!
												switch	vErr.Errors	{	
												case	jwt.ValidationErrorExpired:	//JWT	expired	
																DisplayAppError(w,	err,	"Access	Token	is	expired,	get	a	new	Token",	401)	
																return	
!
												default:	
																DisplayAppError(w,	err,	"Error	while	parsing	the	Access	Token!",	500)	
																return	
												}	
!
								default:	
												DisplayAppError(w,	err,	"Error	while	parsing	Access	Token!",	500)	
												return	
								}	
!
				}	
				if	token.Valid	{	
								next(w,	r)	
				}	else	{	
								DisplayAppError(w,	err,	"Invalid	Access	Token",	401)	
!
				}	
}
//	Routes	for	“/users”	path	
func	SetUserRoutes(router	*mux.Router)	*mux.Router	{	
				router.HandleFunc("/users/register",	
controllers.Register).Methods("POST")	
				router.HandleFunc("/users/login",	
controllers.Login).Methods("POST")	
				return	router	
}	
!
//	Routes	for	“/tasks”	path	
func	SetTaskRoutes(router	*mux.Router)	*mux.Router	{	
				taskRouter	:=	mux.NewRouter()	
				taskRouter.HandleFunc("/tasks",	
controllers.CreateTask).Methods("POST")	
			taskRouter.HandleFunc("/tasks/{id}",	
controllers.UpdateTask).Methods(“PUT”)	
..	.	
!
	//	Apply	Authorize	middleware	into	“/tasks”	path	
!
				router.PathPrefix("/tasks").Handler(negroni.New(	
								negroni.HandlerFunc(Authorize),	
								negroni.Wrap(taskRouter),	
				))	
				return	router	
}
THANKS
Shiju Varghese!
gophermonk@gmail.com
https://medium.com/@shijuvar
https://github.com/shijuvar

More Related Content

What's hot

Module: Mutable Content in IPFS
Module: Mutable Content in IPFSModule: Mutable Content in IPFS
Module: Mutable Content in IPFSIoannis Psaras
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)Aaron Schlesinger
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in GolangMo'ath Qasim
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 
REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sREST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sLuram Archanjo
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golangBo-Yi Wu
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventuremylittleadventure
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Codemotion
 
Coding with golang
Coding with golangCoding with golang
Coding with golangHannahMoss14
 
Git 입문자를 위한 가이드
Git 입문자를 위한 가이드Git 입문자를 위한 가이드
Git 입문자를 위한 가이드chandler0201
 
Golang getting started
Golang getting startedGolang getting started
Golang getting startedHarshad Patil
 
Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash CourseHaim Michael
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 

What's hot (20)

Module: Mutable Content in IPFS
Module: Mutable Content in IPFSModule: Mutable Content in IPFS
Module: Mutable Content in IPFS
 
Why you should care about Go (Golang)
Why you should care about Go (Golang)Why you should care about Go (Golang)
Why you should care about Go (Golang)
 
Building microservices with grpc
Building microservices with grpcBuilding microservices with grpc
Building microservices with grpc
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in Golang
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API'sREST vs gRPC: Battle of API's
REST vs gRPC: Battle of API's
 
gRPC
gRPCgRPC
gRPC
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
gRPC - RPC rebirth?
gRPC - RPC rebirth?gRPC - RPC rebirth?
gRPC - RPC rebirth?
 
Golang
GolangGolang
Golang
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 
Git 입문자를 위한 가이드
Git 입문자를 위한 가이드Git 입문자를 위한 가이드
Git 입문자를 위한 가이드
 
Golang getting started
Golang getting startedGolang getting started
Golang getting started
 
Node JS Crash Course
Node JS Crash CourseNode JS Crash Course
Node JS Crash Course
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
Introduction to gRPC
Introduction to gRPCIntroduction to gRPC
Introduction to gRPC
 

Viewers also liked

Comparative Analysis Of GoLang Testing Frameworks
Comparative Analysis Of GoLang Testing FrameworksComparative Analysis Of GoLang Testing Frameworks
Comparative Analysis Of GoLang Testing FrameworksDushyant Bhalgami
 
Stream Processing In Go
Stream Processing In GoStream Processing In Go
Stream Processing In Gokafroozeh
 
Building Scalable Backends with Go
Building Scalable Backends with GoBuilding Scalable Backends with Go
Building Scalable Backends with GoShiju Varghese
 
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Kai Wähner
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaEddy Reyes
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With PytestEddy Reyes
 
Canastas Navideñas 2014 Perú
Canastas Navideñas 2014 PerúCanastas Navideñas 2014 Perú
Canastas Navideñas 2014 PerúOlivier Liem
 
Internet Movilidad Productividad 20091201 Manresa
Internet Movilidad Productividad 20091201 ManresaInternet Movilidad Productividad 20091201 Manresa
Internet Movilidad Productividad 20091201 ManresaRamon Costa i Pujol
 
Google Actívate 2015-05-19 Purchase funnel & Marketing de resultados
Google Actívate 2015-05-19 Purchase funnel & Marketing de resultadosGoogle Actívate 2015-05-19 Purchase funnel & Marketing de resultados
Google Actívate 2015-05-19 Purchase funnel & Marketing de resultadosJorge Fernández Salas
 
The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!
The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!
The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!pauselegacy
 
Rector de la Universidad Industrial de Santander y paramilitar conversan para...
Rector de la Universidad Industrial de Santander y paramilitar conversan para...Rector de la Universidad Industrial de Santander y paramilitar conversan para...
Rector de la Universidad Industrial de Santander y paramilitar conversan para...Comisión Colombiana de Juristas
 
BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...
BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...
BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...Alex King
 
Global Affinity Finance Club Summer 2013
Global Affinity Finance Club Summer 2013Global Affinity Finance Club Summer 2013
Global Affinity Finance Club Summer 2013Intelligo Consulting
 
Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...
Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...
Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...Eswar Publications
 
Competitividad Y Crecimiento Pasos Que Chile Debe Dar
Competitividad Y Crecimiento Pasos Que Chile Debe DarCompetitividad Y Crecimiento Pasos Que Chile Debe Dar
Competitividad Y Crecimiento Pasos Que Chile Debe DarCreainnova Consultores
 

Viewers also liked (20)

Comparative Analysis Of GoLang Testing Frameworks
Comparative Analysis Of GoLang Testing FrameworksComparative Analysis Of GoLang Testing Frameworks
Comparative Analysis Of GoLang Testing Frameworks
 
Stream Processing In Go
Stream Processing In GoStream Processing In Go
Stream Processing In Go
 
Building Scalable Backends with Go
Building Scalable Backends with GoBuilding Scalable Backends with Go
Building Scalable Backends with Go
 
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
 
Webservices ingo
Webservices ingoWebservices ingo
Webservices ingo
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With Pytest
 
Canastas Navideñas 2014 Perú
Canastas Navideñas 2014 PerúCanastas Navideñas 2014 Perú
Canastas Navideñas 2014 Perú
 
Internet Movilidad Productividad 20091201 Manresa
Internet Movilidad Productividad 20091201 ManresaInternet Movilidad Productividad 20091201 Manresa
Internet Movilidad Productividad 20091201 Manresa
 
Google Actívate 2015-05-19 Purchase funnel & Marketing de resultados
Google Actívate 2015-05-19 Purchase funnel & Marketing de resultadosGoogle Actívate 2015-05-19 Purchase funnel & Marketing de resultados
Google Actívate 2015-05-19 Purchase funnel & Marketing de resultados
 
The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!
The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!
The Pause Legacy - Chapter 8: Four! I Mean Five! I Mean Fire!
 
Rector de la Universidad Industrial de Santander y paramilitar conversan para...
Rector de la Universidad Industrial de Santander y paramilitar conversan para...Rector de la Universidad Industrial de Santander y paramilitar conversan para...
Rector de la Universidad Industrial de Santander y paramilitar conversan para...
 
BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...
BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...
BPS DCP SIGOPAC Good Practice Guidance in Demonstrating Quality and Outcomes ...
 
Mein Parlament
Mein ParlamentMein Parlament
Mein Parlament
 
Global Affinity Finance Club Summer 2013
Global Affinity Finance Club Summer 2013Global Affinity Finance Club Summer 2013
Global Affinity Finance Club Summer 2013
 
Student.profinfo.pl
Student.profinfo.pl Student.profinfo.pl
Student.profinfo.pl
 
Sprint Point - prezentare Adrian Pica
Sprint Point - prezentare Adrian PicaSprint Point - prezentare Adrian Pica
Sprint Point - prezentare Adrian Pica
 
Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...
Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...
Psychoanalysis of Online Behavior and Cyber Conduct of Chatters in Chat Rooms...
 
Laboratorio 4
Laboratorio 4Laboratorio 4
Laboratorio 4
 
Competitividad Y Crecimiento Pasos Que Chile Debe Dar
Competitividad Y Crecimiento Pasos Que Chile Debe DarCompetitividad Y Crecimiento Pasos Que Chile Debe Dar
Competitividad Y Crecimiento Pasos Que Chile Debe Dar
 

Similar to Writing HTTP Middleware In Go

Evolution Of The Web Platform & Browser Security
Evolution Of The Web Platform & Browser SecurityEvolution Of The Web Platform & Browser Security
Evolution Of The Web Platform & Browser SecuritySanjeev Verma, PhD
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiTiago Knoch
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and JavascriptPradip Shrestha
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesSam Bowne
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumBen Ramsey
 
KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 2/7KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 2/7phuphax
 
CNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesSam Bowne
 
Shindig Apachecon Asia 09
Shindig Apachecon Asia 09Shindig Apachecon Asia 09
Shindig Apachecon Asia 09Nuwan Bandara
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebservertarensi
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGArulkumar
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeCale Hoopes
 
Module-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPModule-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPSIVAKUMAR V
 
Presentation1
Presentation1Presentation1
Presentation1Twigsta
 

Similar to Writing HTTP Middleware In Go (20)

Basics of the Web Platform
Basics of the Web PlatformBasics of the Web Platform
Basics of the Web Platform
 
Evolution Of The Web Platform & Browser Security
Evolution Of The Web Platform & Browser SecurityEvolution Of The Web Platform & Browser Security
Evolution Of The Web Platform & Browser Security
 
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web apiASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
 
Spider Course Day 1
Spider Course Day 1Spider Course Day 1
Spider Course Day 1
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and Javascript
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
 
Desktop Apps with PHP and Titanium
Desktop Apps with PHP and TitaniumDesktop Apps with PHP and Titanium
Desktop Apps with PHP and Titanium
 
Php reports sumit
Php reports sumitPhp reports sumit
Php reports sumit
 
KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 2/7KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 2/7
 
Intro apache
Intro apacheIntro apache
Intro apache
 
CNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application Technologies
 
Java part 3
Java part  3Java part  3
Java part 3
 
Www(alyssa) (2)
Www(alyssa) (2)Www(alyssa) (2)
Www(alyssa) (2)
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
Shindig Apachecon Asia 09
Shindig Apachecon Asia 09Shindig Apachecon Asia 09
Shindig Apachecon Asia 09
 
05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
 
Middleware in Golang: InVision's Rye
Middleware in Golang: InVision's RyeMiddleware in Golang: InVision's Rye
Middleware in Golang: InVision's Rye
 
Module-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPModule-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHP
 
Presentation1
Presentation1Presentation1
Presentation1
 

More from Shiju Varghese

Building Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service WeaverBuilding Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service WeaverShiju Varghese
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemShiju Varghese
 
Event-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS StreamingEvent-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS StreamingShiju Varghese
 
A Primer to Containerization & Microservices
A Primer to Containerization & MicroservicesA Primer to Containerization & Microservices
A Primer to Containerization & MicroservicesShiju Varghese
 
Building RESTful Services With Go and MongoDB
Building RESTful Services With Go and MongoDBBuilding RESTful Services With Go and MongoDB
Building RESTful Services With Go and MongoDBShiju Varghese
 
Practicing Mindfulness
Practicing MindfulnessPracticing Mindfulness
Practicing MindfulnessShiju Varghese
 
Azure Mobile Services .NET Backend
Azure Mobile Services .NET BackendAzure Mobile Services .NET Backend
Azure Mobile Services .NET BackendShiju Varghese
 
Windows Azure Mobile Services
Windows Azure Mobile ServicesWindows Azure Mobile Services
Windows Azure Mobile ServicesShiju Varghese
 
JavaScript, Meet Cloud : Node.js on Windows Azure
JavaScript, Meet Cloud : Node.js on Windows AzureJavaScript, Meet Cloud : Node.js on Windows Azure
JavaScript, Meet Cloud : Node.js on Windows AzureShiju Varghese
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsShiju Varghese
 
Windows Azure Cloud Services
Windows Azure Cloud Services Windows Azure Cloud Services
Windows Azure Cloud Services Shiju Varghese
 
Windows Azure Webs Sites
Windows Azure Webs SitesWindows Azure Webs Sites
Windows Azure Webs SitesShiju Varghese
 
Building Apps with Node.js
Building Apps with Node.jsBuilding Apps with Node.js
Building Apps with Node.jsShiju Varghese
 
Introducing Razor - A new view engine for ASP.NET
Introducing Razor - A new view engine for ASP.NET Introducing Razor - A new view engine for ASP.NET
Introducing Razor - A new view engine for ASP.NET Shiju Varghese
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET AppsShiju Varghese
 
TDD with ASP.NET MVC 1.0
TDD with ASP.NET MVC 1.0TDD with ASP.NET MVC 1.0
TDD with ASP.NET MVC 1.0Shiju Varghese
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Shiju Varghese
 

More from Shiju Varghese (20)

Building Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service WeaverBuilding Modern Distributed Applications in Go with Service Weaver
Building Modern Distributed Applications in Go with Service Weaver
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging System
 
Event-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS StreamingEvent-Driven Microservices With NATS Streaming
Event-Driven Microservices With NATS Streaming
 
A Primer to Containerization & Microservices
A Primer to Containerization & MicroservicesA Primer to Containerization & Microservices
A Primer to Containerization & Microservices
 
Building RESTful Services With Go and MongoDB
Building RESTful Services With Go and MongoDBBuilding RESTful Services With Go and MongoDB
Building RESTful Services With Go and MongoDB
 
Docker and Kubernetes
Docker and KubernetesDocker and Kubernetes
Docker and Kubernetes
 
Practicing Mindfulness
Practicing MindfulnessPracticing Mindfulness
Practicing Mindfulness
 
Azure DocumentDB
Azure DocumentDBAzure DocumentDB
Azure DocumentDB
 
Azure Mobile Services .NET Backend
Azure Mobile Services .NET BackendAzure Mobile Services .NET Backend
Azure Mobile Services .NET Backend
 
Windows Azure Mobile Services
Windows Azure Mobile ServicesWindows Azure Mobile Services
Windows Azure Mobile Services
 
JavaScript, Meet Cloud : Node.js on Windows Azure
JavaScript, Meet Cloud : Node.js on Windows AzureJavaScript, Meet Cloud : Node.js on Windows Azure
JavaScript, Meet Cloud : Node.js on Windows Azure
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Windows Azure Cloud Services
Windows Azure Cloud Services Windows Azure Cloud Services
Windows Azure Cloud Services
 
Windows Azure Webs Sites
Windows Azure Webs SitesWindows Azure Webs Sites
Windows Azure Webs Sites
 
Building Apps with Node.js
Building Apps with Node.jsBuilding Apps with Node.js
Building Apps with Node.js
 
Node on Windows Azure
Node on Windows AzureNode on Windows Azure
Node on Windows Azure
 
Introducing Razor - A new view engine for ASP.NET
Introducing Razor - A new view engine for ASP.NET Introducing Razor - A new view engine for ASP.NET
Introducing Razor - A new view engine for ASP.NET
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
 
TDD with ASP.NET MVC 1.0
TDD with ASP.NET MVC 1.0TDD with ASP.NET MVC 1.0
TDD with ASP.NET MVC 1.0
 
Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0Introduction to ASP.NET MVC 1.0
Introduction to ASP.NET MVC 1.0
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Writing HTTP Middleware In Go