boyney123/mockit

HTML getting rendered in the response field

開放

#21 建立於 2019年4月22日

 (9 則留言) (0 個反應) (0 位負責人)JavaScript (79 個分叉)batch import
assignedenhancementhelp wanted

倉庫指標

星標
 (1,574 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

What you did:

Add this HTML snippet inside the response field. And you will see it render...

<div style='width: 500px; background-color: red;'>Hey you!</div>

What happened:

It rendered the HTML

image

Suggested solution:

I think at the moment mockit will only return JSON responses. It would be nice that HTML does not get rendered as HTML, but also maybe give the user an error if HTML was added?

Option 2: We can try and support HTML as responses but not sure what would be involved.

貢獻者指南