Fix #2922: file uploads fail to render curl command
The request body is an immutable.js OrderedMap rather than a string, so this fixes the type error: TypeError: request.get(...).split is not a function Adds a special curl command argument for files, e.g. curl -F "param=value" -F "file=@filename.txt;type=text/plain"
This commit is contained in:
@@ -19,7 +19,7 @@ export default class Curl extends React.Component {
|
||||
<div>
|
||||
<h4>Curl</h4>
|
||||
<div className="copy-paste">
|
||||
<textarea onFocus={this.handleFocus} className="curl" style={{ whiteSpace: "normal" }} value={curl}></textarea>
|
||||
<textarea onFocus={this.handleFocus} readOnly="true" className="curl" style={{ whiteSpace: "normal" }} value={curl}></textarea>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user