Attention is currently required from: dexter.
2 comments:
File library/HTTP_Adapter.ttcn:
Patch Set #1, Line 85: msg.request := {
I am not agreeing here. […]
why can't you just do something like:
function f_ts_body_or_empty(template (omit) body) return template (value) charstring {
if (istemplatekind(body, "omit") {
return "";
}
return body
}
template (value) HTTPMessage ts_HTTP_Req(charstring url,
charstring method := "GET",
template charstring body := omit,
integer v_maj := 1, integer v_min := 1,
charstring host,
HeaderLines custom_hdr := { }) := {
.request := {
client_id := omit,
method := method,
uri := url,
version_major := v_maj,
version_minor := v_min,
header := valueof(f_ts_HTTP_Header(body, host, custom_hdr))
body := f_ts_body_or_empty(body)
}
}
Btw, I wonder why can't just also just pass a "body := omit" to it? What's wrong with that?
File library/HTTP_Adapter.ttcn:
Patch Set #2, Line 100: if (ispresent(body)) {
I'm not that sure this ispresent(body) directly on a variable is what you are actually want. Did you validate it? You may need istemplatekind("omit")?
You are also already using templatekind for the same stuff way up in the file.
To view, visit change 36505. To unsubscribe, or for help writing mail filters, visit settings.