<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Handler on Gopher Coding</title><link>https://gophercoding.com/tags/handler/</link><description>Recent content in Handler on Gopher Coding</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 02 Apr 2023 12:13:48 +0100</lastBuildDate><atom:link href="https://gophercoding.com/tags/handler/index.xml" rel="self" type="application/rss+xml"/><item><title>Get/Set HTTP Headers in Go Request</title><link>https://gophercoding.com/get-set-http-headers-in-go-request/</link><pubDate>Wed, 21 Dec 2022 17:00:00 +0000</pubDate><guid>https://gophercoding.com/get-set-http-headers-in-go-request/</guid><description>&lt;p>HTTP headers, we all need &amp;rsquo;em &amp;#x1f609;&lt;/p>
&lt;p>Here&amp;rsquo;s how you can &lt;strong>get&lt;/strong> and &lt;strong>set&lt;/strong> these headers within your Go requests. These include request coming &lt;em>into&lt;/em> your router handlers and requests you are sending out to other systems through &lt;code>net/http&lt;/code>. This can be thought of as being the same as reading headers from a request and creating new ones.&lt;/p>
&lt;p>First we&amp;rsquo;ll start with reading them from the request.&lt;/p></description></item></channel></rss>