mtakaki / cachet-url-monitor

URL monitor plugin for cachethq.io
MIT License
125 stars 49 forks source link

Add client header option to requests #61

Closed mazhead closed 5 years ago

mazhead commented 5 years ago

This would add client header option to the requests. Would help in some particular cases where header is expected.

Note: The request headers needs to be a dictionary.

Feel free to modify if it does not fit your coding style.

mtakaki commented 5 years ago

That's pretty good, @mazhead. Thanks for this change. Do you mind adding unit tests too? :)

mazhead commented 5 years ago

@mtakaki added unit tests. Basically to just check if with header and without header the response is correct. I had to remove the os.environ for HEADER as it does not support dict.

mtakaki commented 5 years ago

Thanks again for this, @mazhead!