How can I return datas to Http Request? #7360
Replies: 1 comment
-
Posted at 2020-03-24 by Robin Tue 2020.03.24 Has an attempt to place a console.log() statement just after the http.get request at L1a to see if anything is being detected/returned within the callback? Related content with fix Could it be related to https Posted at 2020-03-24 by user109783 The code
In the Mehtod recv(), I did got datas and retruned them. But where these datas go I really don't know, and how do they go back to http.get response body?
Posted at 2020-03-24 by Robin This might have the solution and a reasonable explanation:
My suggestion is to post the response data *in it's entirety* so that others may take a look and compare to what should be in the response packet. > 'how do they go back to' Don't know but, could it be the use of the arrow functions not allowing binding to the http response object? Posted at 2020-03-25 by user109783 This is the request message
And this is the response message
I tried to put debuggers in two places. In this place, I can't reach the debugger 2.
And the second place here:
I can reach debugger 3. And then where the code goes puzzle me so much! What's the relation between Http.get() and recv()?
Posted at 2020-03-25 by Robin Tue 2020.03.24 It is working as expected as text 'Hello World!' is returned. As at L20 the string is available in local scope, why not assign it to a global var at that point? Better: POST not GET See link in post #4 and: Concept
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-03-24 by user109783
Now I use a SIM7600CE for 4G connection. The modules didn't adapt for this kind of sim card.
So I have to write my own module for it.
Now I can get response datas in this Method:
I think this part is the place where return datas to http.get().
But I can't recieve any datas in this place.
Do you have any introductions about how the datas flow in the network?
Beta Was this translation helpful? Give feedback.
All reactions