GW2Treasures / gw2api

Wrapper for the Guild Wars 2 API in PHP
MIT License
21 stars 9 forks source link

Return $response from ApiHandler onResponse #118

Closed darthmaim closed 1 year ago

darthmaim commented 5 years ago

This allows API Handlers to modify the response instead of just accessing the contents. I don't know why we didn't do that from the start. This is a breaking change!

function onResponse($request, $response) {
  return $response->withBody( Psr7\stream_for('[]') );
}