feat: support for sending xml and text request body (resolves #10)

This commit is contained in:
Anoop M D
2022-10-02 04:58:43 +05:30
parent 6e926f0ba6
commit 7f0f496bb4
8 changed files with 156 additions and 18 deletions

View File

@@ -31,7 +31,7 @@ export default class QueryEditor extends React.Component {
lineNumbers: true,
lineWrapping: true,
tabSize: 2,
mode: 'application/ld+json',
mode: this.props.mode || 'application/ld+json',
keyMap: 'sublime',
autoCloseBrackets: true,
matchBrackets: true,
@@ -89,6 +89,7 @@ export default class QueryEditor extends React.Component {
) {
this.cachedValue = this.props.value;
this.editor.setValue(this.props.value);
this.editor.setOption("mode", this.props.mode);
}
this.ignoreChangeEvent = false;
}