httpGET sample code

Any working sample code of using http GET-request?

libcurl provides and example they describe as Simple https GET

There is also a httpGet sample app that’s part of Legato.

1 Like

Trying to run HttpGet sample gives:
Jan 6 00:20:39 | supervisor[654]/supervisor T=main | app.c CreateFileLink() 1485 | Could not stat file at ‘/etc/resolv.conf’. No such file or directory
Jan 6 00:20:39 | supervisor[654]/supervisor T=main | app.c CreateFileLink() 1588 | Failed to create link at ‘/etc/resolv.conf’ in app ‘httpGet’.

Propably I have something wrong with my environment, how to find resolv.conf? ( im using Win DS, module 7702)

Hi All,

I need some quick help on this. This app is not working.
This is the legato version 18.07.0-2-g3d867cd9_8cbd288d69eeddef221f1c21dd15683d_modified using on WP7608 module.

Actually, it was working earlier. I had developed a POST functionality. Even that is also not working.

Did anyone try this on the recent 18.07.0 release?
Did something happen on the DataServices in 18.07.0?

Need help urgently. Going for a demo this weekend.
Here is the log.

Sep 17 09:12:17 swi-mdm9x28 user.warn Legato: -WRN- | _UNKNOWN_[11718]/framework T=main | LE_FILENAME le_fdMonitor_Create() 672 | FD Monitor object name 'httpGet.httpGetComponent.le_data' truncated to 'httpGet.httpGetComponent.le_dat'. Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718] | HTTP Get! Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718]/httpGetComponent T=main | httpGet.c SetTechnologies() 60 | Setting the technologies to use for the data connection. Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718]/httpGetComponent T=main | httpGet.c SetTechnologies() 67 | Added Wifi as the first technology to use. Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718]/httpGetComponent T=main | httpGet.c SetTechnologies() 82 | Added Cellular as the second technology to use. Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718]/httpGetComponent T=main | httpGet.c CheckTechnologies() 97 | Checking the technologies to use for the data connection. Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718]/httpGetComponent T=main | httpGet.c _httpGetComponent_COMPONENT_INIT() 296 | Requesting connection... Sep 17 09:12:17 swi-mdm9x28 user.info Legato: INFO | httpGet[11718]/httpGetComponent T=main | httpGet.c ConnectData() 144 | Requesting the data connection: 0x10000005. Sep 17 09:12:47 swi-mdm9x28 user.err Legato: =ERR= | httpGet[11718]/httpGetComponent T=main | httpGet.c TimeoutHandler() 203 | Couldn't establish connection after 30 seconds Sep 17 09:12:47 swi-mdm9x28 user.info Legato: INFO | supervisor[655]/supervisor T=main | proc.c proc_SigChildHandler() 2035 | Process 'httpGet' (PID: 11718) has exited with exit code 1. Sep 17 09:12:47 swi-mdm9x28 user.warn Legato: -WRN- | supervisor[655]/supervisor T=main | app.c app_SigChildHandler() 3480 | Process 'httpGet' in app 'httpGet' faulted: Ignored. Sep 17 09:12:47 swi-mdm9x28 user.info Legato: INFO | supervisor[655]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application 'httpGet' has stopped.

@dfrey, will you be able to throw some light on this?

Thanks
Madan