-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
events does not provide access to the response object #83
Comments
I think I've independently run into the same issue. Using both iron-form is being submitted to a PHP script which simply echo's "Hello World". Further details at StackOverflow |
This issue does not appear to affect DOCTYPE='application/json', iron-form.contentType='json' => non-null |
I have the same problem, could you please fix this issue? |
+1 |
same here ... +1 |
+1 for response object for text/html |
/cc @rictic, since |
@rictic are there any chances of resolving this issue? I'd really appreciate this. |
hi, |
I tested on JSON, it returned null. |
Hm, I'm having trouble reproducing this issue. Usually when response is unexpectedly null that's because the underlying Here's a repro case, comment out the handleAs line to see the response parsed as raw text rather than json: https://jsbin.com/mijuxocuho/edit?html,output |
@rictic It works for you because https://httpbin.org/get?name=hi2 returns JSON. |
It works for response types other than JSON, you just have to tell the underlying iron-ajax the response type to expect, as the response is parsed by the browser before javascript gets a hold of it. Here's the above example, configured to treat the response type as text: https://jsbin.com/cajizisexu/edit?html,output |
Events
iron-form-error
andiron-form-response
don't provide access to theevent.detail.response
object.While
iron-form-error
doesn't have it at all (it allows access only to the request), iniron-form-response
event.detail.response
is set to null.The text was updated successfully, but these errors were encountered: