Skip to content

Add ability to supply X-Barstool-UUID in a request header#6

Open
allmanaj wants to merge 2 commits into
saloonphp:mainfrom
allmanaj:pass-in-x-barstool-uuid
Open

Add ability to supply X-Barstool-UUID in a request header#6
allmanaj wants to merge 2 commits into
saloonphp:mainfrom
allmanaj:pass-in-x-barstool-uuid

Conversation

@allmanaj
Copy link
Copy Markdown

Overview of change

This PR adds the ability to send your own custom X-Barstool-UUID in the header of a Saloon request and to have that be the UUID stored against the row in the barstools table.

Reasoning

I have started using Barstool at work to provide visibility of our requests since the codebase relies heavily on calls to external APIs. Barstool is ideal for this, but we have an instance where we want to store more specific data about a certain repeated job and how to connects to other models in our codebase. By checking for the existence of the X-Barstool-UUID header before the package generates a new UUID, it allows us to supply a UUID from our codebase which can be stored on the more detailed log model. This allows us to associate our own log with the barstool record without clogging up the barstools table.

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.

1 participant