Attention is currently required from: dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36503?usp=email )
Change subject: HTTP_Adapter: add HOST field to header lines. ......................................................................
Patch Set 1: Code-Review-1
(2 comments)
File library/HTTP_Adapter.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36503/comment/9dcdc0c4_a3468... PS1, Line 55: ts_HTTP_Header here the problem actually gets worse as the template is used within the module itself, and even if ts_HTTP_Header would have some way to specify a different content-type, the user has no way of specifying it ,as it's hardcoded here.
I think if you want this as a library, it needs to permit the user to specify arbitrary content-type and/or additional headers (like the headers used in ES9+)
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36503/comment/115bf9bc_17ff2... PS1, Line 42: application the json content-type is specific to a JSON based REST interface, and not generic. ts_HTTP_HEader and library/HTTP_Adapter however seem to imply that this is generic code. I think this should be generalized in a way that the user can specify the content-type, either
1) as string a sadditional template argument (not elegant) 2) as some kind of instance variable that is passed in during f_http_init 3) by some generic mechanism how additional header lines can be passed to ts_HTTP_Header?