Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

HTTP streaming is on = no json content #1337

Closed
andriytyurnikov opened this Issue · 0 comments

2 participants

Andriy Tyurnikov José Valim
Andriy Tyurnikov

#when
#in SomeController
stream

def some_action
respond_to do |format|
format.json do
render :json => @some_collection.map{ |p| { id: p.id, name: p.full_name} }
end
end
end

#request and respose headers looks same, but no JSON content is visible in browser

#Perhaps it is misuse or something, but it should be documented or reimplemented defensively then, IMHO

José Valim josevalim closed this issue from a commit
José Valim josevalim Remove stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
7da88c5
José Valim josevalim closed this in 7da88c5
Joseph Wong jhtwong referenced this issue from a commit in SAP-Oxygen/rails
José Valim josevalim Deprecate stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
a05d59f
Thomas ttosch referenced this issue from a commit
José Valim josevalim Deprecate stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
c8997d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.