Skip to content

Replace the in-house HTTP client with a famous external library #209

Closed

Description

@atanasovg

The Runtime provides code for handling HTTP requests but the scenarios covered are very simple ones. The more apps are written, the more problems arise - for example issues #195 & #194. Instead of investing in writing our own code (a.k.a "inventing the wheel"), we may reuse some well-tested and adopted third-party library such as OKHttp.

Activity

  1. modified the milestones: , 1.4.0 on Sep 12, 2015
  2. atanasovg commented on Oct 1, 2015

    @atanasovg
    ContributorAuthor

    There is a simple workaround for #194 & #195. We will postpone the integration of the library for now.

  3. modified the milestones: , 1.4.0 on Oct 1, 2015
  4. alexrainman commented on Oct 12, 2015

    @alexrainman

    I was wondering and this thread seems to confirm that you are planning to use OkHttp and that's awesome. OkHttp is way faster and it's the counterpart of NSUrlSession.

  5. removed this from the milestone on Oct 15, 2015
  6. self-assigned this
    on Aug 11, 2016
  7. alexrainman commented on Sep 29, 2016

    @alexrainman

    I know the OkHttp plugin already exists but, any news when the library will be integrated in the core?

  8. slavchev commented on Oct 11, 2016

    @slavchev

    This is issue is not relevant anymore because the previous HTTP implementation is moved from the runtime to the project template.

    @alexrainman The were indeed plans to provide JavaScript/TypeScript wrapper around OkHttp but so far I cannot confirm if it will be executed. To give you more context - we had plans to provide a plugin for OkHttp and it seemed like a good addition to our core modules. Implementing this functionality in the runtime doesn't seem right. Before closing this issue I would like to hear more about your scenarios. Also we can continue the conversation in NativeScript/issues if you prefer.

  9. alexrainman commented on Oct 11, 2016

    @alexrainman

    @slavchev im going to do some testing to confirm your http module for android is compatible with MobileIron vpn tunneling. Also okhttp is faster. Thanks

  10. slavchev commented on Oct 11, 2016

    @slavchev

    @alexrainman If I may save you time I am sure you will definitely find OkHttp much faster and functionality rich. The current http implementation was provided to bootstrap our core modules so people can handle simple request/response scenarios. I think OkHttp is the way to go especially if you have more complex scenarios.

  11. alexrainman commented on Oct 11, 2016

    @alexrainman

    @slavchev yes but then i will have platform specific http related code because okhttp doesnt override your android implementation when you install the plugin. That could be the solution. Once you install okhttp plugin, make it the default http message handler. Can that be done? Thanks

  12. slavchev commented on Oct 11, 2016

    @slavchev

    yes but then i will have platform specific http related code because okhttp doesnt override your android implementation when you install the plugin.

    I agree.

    Once you install okhttp plugin, make it the default http message handler. Can that be done?

    AFAIK this is not supported at the moment. However we can think how to make our modules more extendable starting with the http module. If we go this way we have to think how we are going the provide the same functionality for iOS because the core modules are platform agnostic. Providing Android specific OkHttp plugin is also an option as it will solve real problems. With that in mind I would suggest to create a new issue in core modules where it will have better visibility.

  13. Plamen5kov commented on Dec 7, 2016

    @Plamen5kov
    Contributor

    Close because: "This is issue is not relevant anymore because the previous HTTP implementation is moved from the runtime to the project template."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions