import React, {Component, PropTypes} from 'react' import {Tab, Tabs, TabList, TabPanel} from 'react-tabs' import KeyValueEditor from '../components/base/KeyValueEditor' import ContentTypeDropdown from '../components/ContentTypeDropdown' import RequestBodyEditor from '../components/RequestBodyEditor' import RequestAuthEditor from '../components/RequestAuthEditor' import RequestUrlBar from '../components/RequestUrlBar' import {getContentTypeName} from '../lib/contentTypes' const RequestPane = props => { const { request, sendRequest, updateRequestUrl, updateRequestMethod, updateRequestBody, updateRequestParams, updateRequestAuthentication, updateRequestHeaders, updateRequestContentType } = props; if (!request) { return (
) } return (
sendRequest(request)} onUrlChange={updateRequestUrl} onMethodChange={updateRequestMethod} url={request.url} method={request.method} />


) }; RequestPane.propTypes = { // Functions sendRequest: PropTypes.func.isRequired, updateRequestUrl: PropTypes.func.isRequired, updateRequestMethod: PropTypes.func.isRequired, updateRequestBody: PropTypes.func.isRequired, updateRequestParams: PropTypes.func.isRequired, updateRequestAuthentication: PropTypes.func.isRequired, updateRequestHeaders: PropTypes.func.isRequired, updateRequestContentType: PropTypes.func.isRequired, // Other request: PropTypes.object }; export default RequestPane;