Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Conversation

@pbrisbin
Copy link
Contributor

I got it in my head that the non-200 card was the perfect time to refactor to
the middleware pattern we discussed previously. It would make it trivial to add
an HTTP-Response-Checker into the stack.

After finishing that refactoring, I found that Faraday has its own middleware
to tell it to raise on non-200, so I just enabled that. Sigh.

I think this refactoring was a Good Thing anyway, so I'm opening the PR with it
included.

Once merged, CC will just have to change to the usage outlined in the
Invocation class docs.

Move to a Middelware pattern to ease the introduction of new handlers
later (i.e. for HTTP response checking, etc).

Service.receive was removed. Now, Service::Invocation is the main
interface to outside callers, they should build and pass the service
instance themselves.
brynary added a commit that referenced this pull request Mar 10, 2014
Middleware pattern, tell Faraday to raise
@brynary brynary merged commit 7752a3e into master Mar 10, 2014
@brynary brynary deleted the pb-check-http-responses branch March 10, 2014 22:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants