Module: Stitches::CallingServiceName
- Included in:
- Api::ApiController
- Defined in:
- lib/stitches/calling_service_name.rb
Constant Summary collapse
- HEADER =
"X-StitchFix-Calling-Service"
Instance Method Summary collapse
Instance Method Details
#calling_service_name ⇒ Object
5 6 7 8 9 10 |
# File 'lib/stitches/calling_service_name.rb', line 5 def calling_service_name @calling_service_name ||= request.headers[HEADER].presence || (respond_to?(:api_client, true) && api_client&.name) || "" end |