{"id":4595,"date":"2020-11-30T11:10:02","date_gmt":"2020-11-30T05:40:02","guid":{"rendered":"https:\/\/golangbyexamples.com\/?p=4595"},"modified":"2020-11-30T11:10:08","modified_gmt":"2020-11-30T05:40:08","slug":"canonical-http-header-key","status":"publish","type":"post","link":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/","title":{"rendered":"Canonical HTTP Header Key Meaning"},"content":{"rendered":"\n

Canonical form means that first character and after that any character following a hyphen is in uppercase. All other characters will be in lowercase. Example of canonical forms are<\/p>\n\n\n\n

Content-Type\nAccept-Encoding<\/code><\/pre>\n\n\n\n

All the keys in the headers are represented in the canonical form only. For eg if there are below headers in an incoming http\u00a0request<\/p>\n\n\n\n

content-type: applcation\/json\naccept-encoding: gzip<\/code><\/pre>\n\n\n\n

Then at server most of the http library in different languages at server will interpret it in the canonical form. For example the above headers will be as below when we print headers at server end.<\/p>\n\n\n\n

Content-Type: application\/json\nAccept-Encoding: gzip<\/code><\/pre>\n\n\n\n

Note that<\/p>\n\n\n\n

  • content-type<\/strong> is converted to canonical form Content-Type<\/strong><\/li><\/ul>\n\n\n\n
    • accept-encoding<\/strong> is converted to canonical form Accept-Encoding<\/strong><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"

      Canonical form means that first character and after that any character following a hyphen is in uppercase. All other characters will be in lowercase. Example of canonical forms are All the keys…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"class_list":["post-4595","post","type-post","status-publish","format-standard","hentry","category-tech"],"yoast_head":"\nCanonical HTTP Header Key Meaning - Welcome To Golang By Example<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Canonical HTTP Header Key Meaning - Welcome To Golang By Example\" \/>\n<meta property=\"og:description\" content=\"Canonical form means that first character and after that any character following a hyphen is in uppercase. All other characters will be in lowercase. Example of canonical forms are All the keys...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/\" \/>\n<meta property=\"og:site_name\" content=\"Welcome To Golang By Example\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-30T05:40:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-30T05:40:08+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/\",\"url\":\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/\",\"name\":\"Canonical HTTP Header Key Meaning - Welcome To Golang By Example\",\"isPartOf\":{\"@id\":\"https:\/\/golangbyexamples.com\/#website\"},\"datePublished\":\"2020-11-30T05:40:02+00:00\",\"dateModified\":\"2020-11-30T05:40:08+00:00\",\"author\":{\"@id\":\"https:\/\/golangbyexamples.com\/#\/schema\/person\/8833ea7638dafd763cb1db6c0ca4576f\"},\"breadcrumb\":{\"@id\":\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/golangbyexamples.com\/canonical-http-header-key\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/golangbyexamples.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Canonical HTTP Header Key Meaning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/golangbyexamples.com\/#website\",\"url\":\"https:\/\/golangbyexamples.com\/\",\"name\":\"Welcome To Golang By Example\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/golangbyexamples.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/golangbyexamples.com\/#\/schema\/person\/8833ea7638dafd763cb1db6c0ca4576f\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/golangbyexamples.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/golangbyexamples.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Canonical HTTP Header Key Meaning - Welcome To Golang By Example","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/","og_locale":"en_US","og_type":"article","og_title":"Canonical HTTP Header Key Meaning - Welcome To Golang By Example","og_description":"Canonical form means that first character and after that any character following a hyphen is in uppercase. All other characters will be in lowercase. Example of canonical forms are All the keys...","og_url":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/","og_site_name":"Welcome To Golang By Example","article_published_time":"2020-11-30T05:40:02+00:00","article_modified_time":"2020-11-30T05:40:08+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/","url":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/","name":"Canonical HTTP Header Key Meaning - Welcome To Golang By Example","isPartOf":{"@id":"https:\/\/golangbyexamples.com\/#website"},"datePublished":"2020-11-30T05:40:02+00:00","dateModified":"2020-11-30T05:40:08+00:00","author":{"@id":"https:\/\/golangbyexamples.com\/#\/schema\/person\/8833ea7638dafd763cb1db6c0ca4576f"},"breadcrumb":{"@id":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/golangbyexamples.com\/canonical-http-header-key\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/golangbyexamples.com\/canonical-http-header-key\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/golangbyexamples.com\/"},{"@type":"ListItem","position":2,"name":"Canonical HTTP Header Key Meaning"}]},{"@type":"WebSite","@id":"https:\/\/golangbyexamples.com\/#website","url":"https:\/\/golangbyexamples.com\/","name":"Welcome To Golang By Example","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/golangbyexamples.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/golangbyexamples.com\/#\/schema\/person\/8833ea7638dafd763cb1db6c0ca4576f","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/golangbyexamples.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/golangbyexamples.com\/author\/admin\/"}]}},"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paOs1b-1c7","amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/posts\/4595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/comments?post=4595"}],"version-history":[{"count":1,"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/posts\/4595\/revisions"}],"predecessor-version":[{"id":4596,"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/posts\/4595\/revisions\/4596"}],"wp:attachment":[{"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/media?parent=4595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/categories?post=4595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/golangbyexamples.com\/wp-json\/wp\/v2\/tags?post=4595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}