piwik-ruby-api icon indicating copy to clipboard operation
piwik-ruby-api copied to clipboard

Update base.rb,fixed matomo API call

Open Code-Farmer-Ming opened this issue 1 year ago • 3 comments

Description:

Fixed gem work with new version matomo, changed the API call from get to post

Code-Farmer-Ming avatar May 09 '24 03:05 Code-Farmer-Ming

Thank you for the pull request.

I think, loosening the ActiveSupport constraint is the right call.

But why did you change the request method from GET to POST? Which problem does this solve?

daniel-rikowski avatar May 09 '24 09:05 daniel-rikowski

Thank you for the pull request.

I think, loosening the ActiveSupport constraint is the right call.

But why did you change the request method from GET to POST? Which problem does this solve?

Hey!

I was just checking out the gem, and found this PR.

Based on matomo documentation, when using an auth_token which has the Secure use only feature enabled, you won't be able to use it via a GET request. I'm assuming that's the reason behind this change.

ovidiubite avatar Feb 06 '25 17:02 ovidiubite

Sounds plausible.

If that is the case, personally I'd prefer to keep using GET and only use POST when an auth_token is provided. At least until I get some more feedback on that this doesn't break anything for other users and/or use cases.

Anyway, I no longer have merge authorization, so it doesn't actually matter...

daniel-rikowski avatar Feb 17 '25 16:02 daniel-rikowski