/** Update raw data after change in for editor. */ void updateRaw() { updateHeadersRawData(""); ArrayList<RequestHeader> list = new ArrayList<RequestHeader>(); for (HeadersFormRow row : rows) { list.add(new RequestHeader(row.nameBox.getValue(), row.valueBox.getValue())); } updateHeadersRawData(RequestHeadersParser.headersListToString(list)); headersRawInput.setValue(headersData, true); }
/** Get current headers value and fill up form. */ void updateForm() { clearForm(); if (headersData == null) { return; } ArrayList<RequestHeader> list = RequestHeadersParser.stringToHeaders(headersData); for (RequestHeader header : list) { addRow(header.getName(), header.getValue()); } }
void rawEditorChanged(String value) { ArrayList<RequestHeader> list = RequestHeadersParser.stringToHeaders(value); for (RequestHeader header : list) { onHeaderChange(header.getName(), header.getValue()); } }