0

エラーが発生したときに応答のコンテンツ タイプを変更する方法はありますか?

「ServiceExceptionHandler」の contenttype の変更は適用されません。

問題は、iframe トランスポート経由で JSON を送り返すときに、IE/Opera がダウンロードを要求することです。

4

1 に答える 1

0

If the problem is only related to the fact that IE/Opera asks to download the json then you need to understand that IE does not know what to do with application/json contents.You will need to set the CONTENT-TYPE for json as text/html so that IE should not ask to download.

But from the REST perspective, you need to set the correct response type which is application/json so that clients can process the response accordingly.

If you want to get away from the annoying IE/opera download thing, then use some other browser/tool to test the response.

Google chrome rest client is a good tool for basic REST testing. For advanced testing purposes I would advice using JMeter

Hope it helps!

于 2013-06-06T10:31:38.627 に答える