endclothing / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
150 stars 79 forks source link

Add transport method to url #24

Open igordrnobrega opened 4 years ago

igordrnobrega commented 4 years ago

Problem I think is a problem to have transport method hardcoded in line 81 cause it removes the flexibility of the code.

Solution I'm adding the viability of setting it in the constructor without the need of creating or setting a new client for it and letting the class handle the client. I also made some fix on some standards like optional parameters at the end of function declaration and type hinted $method in doRequest function

NoelDavies commented 4 years ago

@igordrnobrega, any updates to the PR review above?

igordrnobrega commented 4 years ago

Sorry for the, almost, 2 months delay on this, but I was really busy this end of the year.