TF6760 Beckhoff Sample Code #8
Unanswered
anahita2709
asked this question in
Q&A
Replies: 1 comment
-
Hi Anahita. This is not really the right place to post this question. You might want to try it at StackOverflow. I'm not sure how this issue could be fixed. I've never used HTTP requests with TwinCAT. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Roald,
I have to send Temperature Sensor value and System Time to the localhost server and the server only accepts JSON format.
Now in each 10 sec temperature value and the time retrieves form PLC and shows in JSON format by using TwinCAT3 .
For adding json header to the request I wrote following line of code before using SendJsonDomRequest method:
fbHeader.AddField(sField:='content-type',sValue:='application/json',FALSE);
HttpStatusCode returns 200 but when I want to Parse the server response I faced an issue and the result of jsonDoc shows 0
jsonDoc:=fbRequest.GetJsonDomContent(fbJson);
Flags status:
nContentSize =0 and fbJson =0
I would apprreciate it if you could please guide me on how I can fix this issue .
Thanks in advance.
Anahita
Beta Was this translation helpful? Give feedback.
All reactions