import React, {PropTypes, PureComponent} from 'react'; import CopyButton from '../base/copy-button'; class ResponseHeadersViewer extends PureComponent { render () { const {headers} = this.props; const headersString = headers.map( h => `${h.name}: ${h.value}` ).join('\n'); return (
{headers.map((h, i) => ( ))}
Name Value
{h.name} {h.value}

); } } ResponseHeadersViewer.propTypes = { headers: PropTypes.array.isRequired }; export default ResponseHeadersViewer;