ibm-security-innovation / crosscoap

CoAP-to-HTTP translator proxy
https://developer.ibm.com/open/crosscoap/
Apache License 2.0
66 stars 22 forks source link

Set value of URIHost as Host in outgoing HTTP request #8

Closed besedad closed 5 years ago

besedad commented 5 years ago

This pull request changes behavior of crosscoap so that value of option coap.URIHost gets assigned to outgoing *http.Request. This change allows to run crosscoap as a single instance while being able to forward requests to multiple backends.

dubek commented 5 years ago

Thank you @besedad for your contribution.

Can you please add a test for this new functionality? In translate_test.go for sure, and ideally also in crosscoap_test.go to verify end-to-end.

besedad commented 5 years ago

Thank you @dubek for such prompt response. I've added the tests.

dubek commented 5 years ago

Merged. Thanks @besedad for your contribution.