<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Token on JOURNAL.ROBBI.MY</title><link>https://journal.robbi.my/tags/token/</link><description>Recent content in Token on JOURNAL.ROBBI.MY</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 19 Dec 2022 02:17:15 +0800</lastBuildDate><atom:link href="https://journal.robbi.my/tags/token/index.xml" rel="self" type="application/rss+xml"/><item><title>Hugo "GetJSON" now support HTTP Header</title><link>https://journal.robbi.my/posts/211009124047/</link><pubDate>Sat, 09 Oct 2021 12:40:47 +0800</pubDate><guid>https://journal.robbi.my/posts/211009124047/</guid><description>&lt;p&gt;TIL that hugo actually support custom HTTP headers to be use together with &lt;code&gt;getJSON&lt;/code&gt; function which means you not anymore limited to just use or call API that have &lt;code&gt;token=xxx&lt;/code&gt; on URL parameter anymore. Now you can use some header such as &lt;code&gt;Authorization&lt;/code&gt; (example: Bearer, OAuth and more).&lt;/p&gt;
&lt;p&gt;The implementation is quite simple just create a &lt;code&gt;dictionary&lt;/code&gt; data and put the information inside and bind it together with &lt;code&gt;getJSON&lt;/code&gt; as second parameter.&lt;/p&gt;</description></item></channel></rss>