Hello all,
This thread is related to this question that I had.
I have a project where my functionalities are split in code modules. In the gps related functionality code module, I want to make a request to Google Api services to get the address based on latitude and longitude.
With HTTP library I could do this using a HttpRequest object and then in its ResponseSuccess event get the result string with Response.GetString, where Response is a parameter of the event of type HttpResponse.
I understood that is recommended to switch to OkHTTP library but the OkHttpResponse object does not have the GetString method anymore. So the switch is not so simple as replacing Http with OkHttp in the code.
The suggested method of doing this request with OkHttp is to use a HttpJob. The problem is that when initializing the HttpJob, you need to pass the targetModule object. And because my code is in a code module, I cannot simply pass a reference like 'Me'.
So, is there a way to have this feature running with OkHttp and still be part of a code module ?
Thank you
This thread is related to this question that I had.
I have a project where my functionalities are split in code modules. In the gps related functionality code module, I want to make a request to Google Api services to get the address based on latitude and longitude.
With HTTP library I could do this using a HttpRequest object and then in its ResponseSuccess event get the result string with Response.GetString, where Response is a parameter of the event of type HttpResponse.
I understood that is recommended to switch to OkHTTP library but the OkHttpResponse object does not have the GetString method anymore. So the switch is not so simple as replacing Http with OkHttp in the code.
The suggested method of doing this request with OkHttp is to use a HttpJob. The problem is that when initializing the HttpJob, you need to pass the targetModule object. And because my code is in a code module, I cannot simply pass a reference like 'Me'.
So, is there a way to have this feature running with OkHttp and still be part of a code module ?
Thank you