Code Monkey home page Code Monkey logo

httpipe's People

Contributors

davidantaramian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

httpipe's Issues

Automatic Content Decoding

I'm envisioning a system similar to Plug's parsers where a user can specify what module to use to parse what types of content. HTTPipe would then decode incoming requests based on the content-type header into the decoded_body key on the response.

Asynchronous Requests

I'm not sure if this makes sense in the context of this library, but if someone is interested, I'd like to know how you see it being used.

[proposal] HTTPipe.Conn.new/1 function

It would be nice if there was a function like this:

HTTPipe.Conn.new(%HTTPipe.Request{})

Example of how I am doing it now:

    req = %HTTPipe.Request{
      method: :post,
      url: "/cloud/project/#{service_name}/user/#{user_id}/regeneratePassword"
    }
    Map.put(HTTPipe.Conn.new(), :request, req)

Would be nice if I could

%HTTPipe.Request{
      method: :post,
      url: "/cloud/project/#{service_name}/user/#{user_id}/regeneratePassword"
    }
|> HTTPipe.Conn.new()

Cookie Support

Is cookie support an interesting feature for anyone? What would the function calls look like to you?

Register Before Execute

Should it be possible to register functions that should be called before a connection is executed in order to modify the request in some fashion?

The specification would look something like this, allowing for both anonymous functions and named functions:

@type before_execute_fun :: (HTTPipe.Request.t -> HTTPipe.Request.t)
@spec register_before_execute(HTTPipe.Conn.t, before_execute_fun) :: Conn.t
@spec register_before_execute(HTTPipe.Conn.t, module, atom) :: Conn.t

In the second case, the atom would refer to a single-arity function in the given module with a spec of (HTTPipe.Request.t) :: HTTPipe.Request.t.

Pooling

One of my biggest concerns with the library currently is that pooling connections is dependent on the individual adapter. I'm open to ideas about a more canonical way to implement pooling at the library level rather than at the adapter level.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.