Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Unresolved
    • Labels:
      None

      Description

      The http client should run inside Deft's ioloop.

        Activity

        Hide
        Ulrich Stärk added a comment -

        Implements #97 (Simple asynchronous http client) (closed by 51e8d37e76dcdf171767bd6a616ae524c15c7f4a) patch by
        rschildmeijer

        Show
        Ulrich Stärk added a comment - Implements #97 (Simple asynchronous http client) (closed by 51e8d37e76dcdf171767bd6a616ae524c15c7f4a) patch by rschildmeijer
        Hide
        Ulrich Stärk added a comment -

        Current status: https://gist.github.com/842452 (work in progress..)
        Could be interesting to let eg. apache httpclient or https://github.com/AsyncHttpClient/async-http-client do the actual http response parsing (to avoid "reinventing the wheel")
        (i.e give the raw byte[]/String (that contains the HTTP response) to one of the above)

        Show
        Ulrich Stärk added a comment - Current status: https://gist.github.com/842452 (work in progress..) Could be interesting to let eg. apache httpclient or https://github.com/AsyncHttpClient/async-http-client do the actual http response parsing (to avoid "reinventing the wheel") (i.e give the raw byte[]/String (that contains the HTTP response) to one of the above)
        Hide
        Ulrich Stärk added a comment -

        http://httpstat.us/ could be useful while debugging the http client

        Show
        Ulrich Stärk added a comment - http://httpstat.us/ could be useful while debugging the http client
        Hide
        Ulrich Stärk added a comment -

        looking into this...

        Show
        Ulrich Stärk added a comment - looking into this...
        Hide
        Ulrich Stärk added a comment -

        I think we want something like the IOStream (simply a decorated socket) class before we start rolling our own http client. (loft: https://github.com/rschildmeijer/loft/blob/master/src/io/loft/IOStream.scala) (The iostream will certainly make it easier for other third party libraries)

        Show
        Ulrich Stärk added a comment - I think we want something like the IOStream (simply a decorated socket) class before we start rolling our own http client. (loft: https://github.com/rschildmeijer/loft/blob/master/src/io/loft/IOStream.scala ) (The iostream will certainly make it easier for other third party libraries)
        Hide
        Ulrich Stärk added a comment -

        Proposed high level api design:
        AsynchronousHttpClient http = new AsynchronousHttpClient();
        http.fetch("http://deftserver.org/", new AsyncResult<HttpResponse>

        { ... });
        // or http.fetch(httpRequestObject, new AsyncResult<HttpResponse> { ... }

        );
        IOLoop.INSTANCE.start();

        Show
        Ulrich Stärk added a comment - Proposed high level api design: AsynchronousHttpClient http = new AsynchronousHttpClient(); http.fetch("http://deftserver.org/", new AsyncResult<HttpResponse> { ... }); // or http.fetch(httpRequestObject, new AsyncResult<HttpResponse> { ... } ); IOLoop.INSTANCE.start();

          People

          • Assignee:
            Unassigned
            Reporter:
            Niklas Gustavsson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development