Setting headers for entire collection/folder

I added the next script in the section “Pre-request Script” for the entire collection folder:

pm.request.headers.add({
        key: 'client_id',
        value: 'random_client_id'
    }
);
pm.request.headers.add({
        key: 'client_secret',
        value: 'random_client_secret'
    }
);
1 Like

Hi@lutaiphong if you don’t mind please send me a sample script of how to send jwt to the header
thank you

The headers that are dynamically generated through the pre-request script will not be shown up as a part of the code that is generated.

Hi! Could you tell me please is it possible somehow add dynamicly generated Headers to collection’s documentation. As I see now it is not included there too.