Changes

m
Fix the breakingline issues
Line 105: Line 105:     
[[File:Networking trb user scripts cli code explanation5.png|left|border|class=tlt-border]]
 
[[File:Networking trb user scripts cli code explanation5.png|left|border|class=tlt-border]]
 +
 +
 +
 +
 +
    
These lines define the URL of the server to which the temperature data will be sent and the payload data that will be sent with each request. The payload includes the '''‘sensor_id’''' and '''‘temp’''' variables, formatted as a JSON object.
 
These lines define the URL of the server to which the temperature data will be sent and the payload data that will be sent with each request. The payload includes the '''‘sensor_id’''' and '''‘temp’''' variables, formatted as a JSON object.
    
[[File:Networking trb user scripts cli code explanation6.png|left]]
 
[[File:Networking trb user scripts cli code explanation6.png|left]]
 +
 +
 +
 +
    
This line uses the '''‘curl’''' command to send an HTTP POST request to the server specified by '''‘$SERVER_URL’'''. The '''‘-X POST’''' option specifies that the request should be a POST request, and the '''‘-H “Content-Type: application/json”’''' option specifies that the payload data is in JSON format. The '''‘-d “$PAYLOAD”’''' option specifies the payload data to be sent with the request.
 
This line uses the '''‘curl’''' command to send an HTTP POST request to the server specified by '''‘$SERVER_URL’'''. The '''‘-X POST’''' option specifies that the request should be a POST request, and the '''‘-H “Content-Type: application/json”’''' option specifies that the payload data is in JSON format. The '''‘-d “$PAYLOAD”’''' option specifies the payload data to be sent with the request.
    
[[File:Networking trb user scripts cli code explanation7.png|left]]
 
[[File:Networking trb user scripts cli code explanation7.png|left]]
 +
 +
 +
       
=== Output ===
 
=== Output ===
 +
[[File:Networking trb user scripts HTTP listener screenshot.png|left|800x800px]]
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
   −
[[File:Networking trb user scripts HTTP listener screenshot.png|left|800x800px]]
      
Run the script by entering the file path of the file or '''./<filename>.sh''' if you are in the same directory.
 
Run the script by entering the file path of the file or '''./<filename>.sh''' if you are in the same directory.