Home > Forum > IEC 61131 Programming (LogicLab) > About FB HTTPClient_v4
tagged: HTTPClient_v4
- This topic has 3 replies, 2 participants and was last updated 1 year, 3 months ago da Sergio Bertana.
-
AuthorPost
-
December 22, 2022 at 2: 24 pm #68956Alberto MengozziParticipant
Hi in the HTTPClient_v4 library the method is missing HostPort (UINT) TCP port number to connect to (Default 80).
As it existed in v2, it is essential for me as I access port 8082.
December 23, 2022 at 8: 03 am #68958Sergio BertanaAdministrator ForumYou weren't careful when reading the example ST_HTTPClient at the bottom of the FB page HTTPClient.
Starting from this version the management of the TCP connection by the FB has been eliminated, now it is necessary to instantiate the FB SysTCPClient in your program and pass the communication stream eFILEP to the FB HTTPClient.
It is therefore evident that both the URL and the port to connect to must be defined in the FB SysTCPClient and no longer in HTTPClient.
These changes have become necessary to be able to handle TLS encryption, if you take a look at the FB SysTLSClient, in case of HTTPS connection it must be inserted between the FB SysTCPClient and the FB HTTPClient transferring eFILEP from one FB to another.
January 26, 2023 at 3: 14 pm #69615Alberto MengozziParticipant….perhaps the "inattention" is due to the fact that in the library page it is still reported
“HostName (@STRING) Name of the server used in the request.
HostPort (UINT) TCP port number to connect to (Default 80).
Page (@STRING) Page definition string required.”(as I already reported in the report)
then luckily I was able to use the old library and I didn't pay attention to it anymore.
But I think it is appropriate to change the manual page to avoid "not being careful" as the customer who has to deliver the new machines urgently calls you, I arrive there and I find that I have to change some fundamental code that has already been tested and validated, it is not easy to work with the laptop in the cold in a shed and also having to "be careful"
January 26, 2023 at 4: 01 pm #69620Sergio BertanaAdministrator ForumIn fact, the definition of had escaped HostPort which was described in the text although it is no longer present in the FB, I proceeded to correct the manual page.
In reality, however, the problem should not arise if you open an existing project, therefore already tested and validated, the object HTTPClient it has already been imported into the project, so if you don't intentionally update the FB LogicLab will continue to use the old version without having to make changes to the project.
I refer you to this article for managing the import of libraries or objects, and a this article which at the bottom describes what happens if an old project is reopened with libraries included that have been updated in the meantime.
You're right about working in the cold in a shed... unfortunately I have white hair and I've been in that situation several times, and maybe even in the middle of the night...
-
AuthorPost
- You must be logged in to reply to this topic.