client-js icon indicating copy to clipboard operation
client-js copied to clipboard

how to add "headers" on HTTPTransport

Open frozt86 opened this issue 2 years ago • 2 comments

hello

so i really appreciate with your works here that i'm using it right now. but i have difficulties with documentation and typescript.

i want to add some http headers into HTTPTransport. can you help me with this Record<string, string> means in Javascript?

i wish that this project will have more explained documentation with it.

great job, and have a nice day!

thank you.

frozt86 avatar Sep 19 '21 07:09 frozt86

After fast reading fetch doc and typescript doc, I suggest

{
    'Header-Name': 'header value',
    // for example :
    'Content-Type': 'plain/text'
}

Regards

gallofeliz avatar Sep 25 '21 22:09 gallofeliz

Yes it is a simple object of keys and values.

bradjones1 avatar Dec 13 '21 07:12 bradjones1