Some possible code improvements:
1. Instead of:
s sc = httprequest.Post("http://127.0.0.1:57772/api/v0/bwxpert/visiocheck/account")it's enough to specify:
s sc = httprequest.Post("/api/v0/bwxpert/visiocheck/account")as the rest of the address is defined beforehand.
2. Instead of:
s httprequest.Authorization = "Basic X1N5c3RlbTpTWVM="
you can specify:
s httprequest.Username = "_SYSTEM" s httprequest.Password = "SYS"
Which is more readable
3. When specifying server, protocol in not required, incorrect even:
s httprequest.Server="127.0.0.1"
4. Finally, don't use short syntax (s, d) and use one naming convention consistently - in your example some commands are in lowercase and some start with a capital letter.
- Log in to post comments

