[S] Change in osmo-ttcn3-hacks[master]: HTTP_Adapter: allow body to be "omit"
Attention is currently required from: pespin. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email ) Change subject: HTTP_Adapter: allow body to be "omit" ...................................................................... Patch Set 3: (2 comments) File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505/comment/76dfe2ed_b6e9b... PS1, Line 85: msg.request := {
why can't you just do something like: […] Thanks for the hint, I didn't see this option. I have now done it this way.
The body field is a mandatory field in type record HTTPRequest. When I set it to omit I also get an error. The body field must be present but it can be empty (""). I have the feeling that the API is a bit miss-designed here, but we have to live with that. File library/HTTP_Adapter.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505/comment/710f732f_4dbdf... PS2, Line 100: if (ispresent(body)) {
I'm not that sure this ispresent(body) directly on a variable is what you are actually want. […] yes, I have tested it, but I also think that istemplatekind() is the better option.
-- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36505?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ifedc8c2a590835663d1ba0b08b1fe4d54bdd0fff Gerrit-Change-Number: 36505 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Comment-Date: Mon, 22 Apr 2024 09:20:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Comment-In-Reply-To: dexter <pmaier@sysmocom.de> Gerrit-MessageType: comment
participants (1)
-
dexter