Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding custom user headers at exec time #39

Merged
merged 2 commits into from Nov 3, 2016

Conversation

jdesiloniz
Copy link

This PR includes code to let users of the api to include custom headers (i.e.: "user-agent", ...) in their API requests. To achieve this, several changes have been introduced:

  • Interpreters now perform a natural transformation from our algebras to a Kleisli that carries the header data.
  • New exec functions have been implemented to make the access to the API easier for users (i.e.: execK exposes the inner Kleisli, exec allows the same behavior as before while letting users add headers to the requests as an optional parameter, and execFuture allows easier access to Future versions of the API for scala-js users).

Could you please review, @raulraja @juanpedromoreno? Thanks!

@codecov-io
Copy link

Current coverage is 86.64% (diff: 100%)

Merging #39 into master will increase coverage by 0.26%

@@             master        #39   diff @@
==========================================
  Files            21         21          
  Lines           301        307     +6   
  Methods         299        305     +6   
  Messages          0          0          
  Branches          2          2          
==========================================
+ Hits            260        266     +6   
  Misses           41         41          
  Partials          0          0          

Powered by Codecov. Last update a714e61...e0ba903

Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Let's wait until @raulraja thoughts around this ;)

Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent.

@jdesiloniz jdesiloniz merged commit 0abc720 into master Nov 3, 2016
@jdesiloniz jdesiloniz deleted the js-add-user-agent-through-kleisli branch November 3, 2016 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants