Second version of curl to guzzle conversion, fixing service injection.