Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

HTTP streaming is on = no json content #1337

Closed
andriytyurnikov opened this Issue · 0 comments

2 participants

@andriytyurnikov

#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

@josevalim josevalim closed this issue from a commit
@josevalim 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
@josevalim josevalim closed this in 7da88c5
@jhtwong jhtwong referenced this issue from a commit in SAP-Oxygen/rails
@josevalim 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
@ttosch ttosch referenced this issue from a commit
@josevalim 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.