influxdata / influxdb-client-php

InfluxDB (v2+) Client Library for PHP
https://influxdata.github.io/influxdb-client-php/
MIT License
150 stars 47 forks source link

Guzzle default headers are overwritten #157

Open cocochepeau opened 2 months ago

cocochepeau commented 2 months ago

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Create an influx client with custom httpClient which has some "default" headers set.
  2. Get for example a writeApi instance, and send some points with DEBUG mode enabled.
  3. We dont see the custom added headers being sent to influx when looking at influx client logfile.

Expected behavior: We should see the custom headers being sent to influx host. To add some context I have influx API under cloudflare zero trust. I want to use service tokens to allow influx client to connect to and write points to my influx API. AFAIK this is not possible ATM due to this headers issue.

Actual behavior: Headers are I guess overwritten when calling the "send" request from http client, more details: https://docs.guzzlephp.org/en/7.0/request-options.html?highlight=default%20header#headers

Specifications:

bednar commented 2 months ago

Hi @cocochepeau,

Thank you for using our client! We truly appreciate your engagement and feedback.

We are always looking to improve and would love to see contributions from our user community. Is this something you would be willing to assist with? Whether it's enhancing functionality, fixing bugs, or improving documentation, every Pull Request is welcome.

We would be happy to review your submission and work with you to integrate it into our project. If you need any guidance on how to get started or have any questions about the process, please don't hesitate to ask.

Looking forward to potentially collaborating with you!

Best Regards

cocochepeau commented 2 months ago

Greetings, I can have a look when I got time (no ETA!).

Best,

bednar commented 2 months ago

Thanks a lot! 👍

On Saturday, August 10, 2024, sykz42 @.***> wrote:

Greetings, I can have a look when I got time (no ETA!).

Best,

— Reply to this email directly, view it on GitHub https://github.com/influxdata/influxdb-client-php/issues/157#issuecomment-2280588206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADPDYJ2GLSZP3PN7CX5RITZQXMKFAVCNFSM6AAAAABMGBESMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBQGU4DQMRQGY . You are receiving this because you commented.Message ID: @.***>