You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Btw, this function is somehow a "hack" to get the value of a given header but maybe a more general solution would be to process all the headers in the response (in a std:map, for instance) so we can easily access to the fiware-total-count header just doing something like reponseHeaders["fiware-total-count"].
In the same sense we have a function to get the response payload (I think is jsonPayloadClean()) we should have some responseHeaders() function for that. However, this can be deferred to a next PR, no need to include that in this (except if you think is easy and you want to do it :)
As per your suggestion we need to change the function to get the response in the form of map to easily access fiware-total-count.
Currently CPr response is received in "out" parameter that is a std::string type variable. I am facing issue while converting the out response into map variable. As per my understanding we need to do lots of code change to convert the string data into map by separating the keys and values from out string.
Could you please elaborate your suggestion or help us to get the response?
Thanks
The text was updated successfully, but these errors were encountered:
Not sure if now is the right moment to implement this issue...
I mean, although it would be smarter implementing a mechanism as I suggest (processing the response payload to grab all the HTTP headers in it and put these header in a std::map which key is the header name and which value is the header value) maybe it doesn't worth the effort if the only header we are going to process is fiware-total-count (which processing logic, although it not the smartest way, is already implemented in PR #4275).
Maybe the moment to implement this issue is when we need another header different from fiware-total-count from response. If that moment never occur :) then maybe this issue is not needed.
In my opinion, by the moment the wiser option is to wait. I'd suggest you to choose another issue (look specially for the help wanted ones).
Thanks for your willingness to contribute to Orion Context Broker!
Yes, I have also the same understanding. As per your suggestion we have stopped working on this issue because currently the processing of only one header is required. We will work on this in future whenever multiple header processing will be required.
Based on the discussion on this issue we are requesting you to mark comment on #4275 (comment) as 'NTC', for now.
@fgalan
From comment #4275 (comment)
As per your suggestion we need to change the function to get the response in the form of map to easily access
fiware-total-count
.Currently CPr response is received in "out" parameter that is a
std::string
type variable. I am facing issue while converting the out response into map variable. As per my understanding we need to do lots of code change to convert the string data into map by separating the keys and values from out string.Could you please elaborate your suggestion or help us to get the response?
Thanks
The text was updated successfully, but these errors were encountered: