• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple headers in context: Golang

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am making use of the standard package :

https://pkg.go.dev/context

I have a use case whereby I set multiple headers in the context. I wonder how this can be done with the standard package. I can set individual header for the context with the following:
(I would have func for each header)

but what I need is to pass the context around and have multiple headers to be set in such context. Is this possible?

Thank you,

G.
 
Geane Norm
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Geane Norm wrote:Hi,
I am making use of the standard package :

https://pkg.go.dev/context

I have a use case whereby I set multiple headers in the context. I wonder how this can be done with the standard package. I can set individual header for the context with the following:
(I would have func for each header)

but what I need is to pass the context around and have multiple headers to be set in such context. Is this possible?

Thank you,

G.



I am trying to understand if I can have something of this sort:


 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure, why not?
 
reply
    Bookmark Topic Watch Topic
  • New Topic