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

Move macro from Http to PendingRequest #2

Merged
merged 1 commit into from
Nov 10, 2020
Merged

Conversation

ttrig
Copy link
Contributor

@ttrig ttrig commented Nov 9, 2020

This makes it possible to chain "withCorrelationId" on a PendingRequest.

// before
Http::withToken('secret')->withCorrelationId()->post('/api'); // BadMethodCallException 
Http::withCorrelationId()->withToken('secret')->post('/api'); // works

// after
Http::withToken('secret')->withCorrelationId()->post('/api'); // works
Http::withCorrelationId()->withToken('secret')->post('/api'); // works

@ttrig ttrig requested review from wecc and emil-nasso November 9, 2020 13:31
@wecc wecc merged commit 358abb8 into master Nov 10, 2020
@wecc wecc deleted the macro-pendingrequest branch November 10, 2020 08:53
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.

3 participants