File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ export const SendTabs = observer((props: {
221221 {
222222 type : 'option' ,
223223 label : 'Duplicate Tab' ,
224- callback : ( ) => props . onAddTab ( _ . cloneDeep ( request . request ) )
224+ callback : ( ) => props . onAddTab ( new RequestInput ( request . request ) )
225225 } ,
226226 {
227227 type : 'option' ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export class RequestInput {
3939 url : string ,
4040 headers : RawHeaders ,
4141 requestContentType : EditableContentType ,
42- rawBody : Buffer
42+ rawBody : Buffer | EditableBody
4343 }
4444 ) {
4545 // When deserializing, we need to ensure the body is provided directly
@@ -49,8 +49,13 @@ export class RequestInput {
4949 this . url = existingData . url ;
5050 this . headers = existingData . headers ;
5151 this . requestContentType = existingData . requestContentType ;
52+
53+ const rawBody = existingData . rawBody instanceof EditableBody
54+ ? existingData . rawBody . decoded
55+ : existingData . rawBody ;
56+
5257 this . rawBody = new EditableBody (
53- existingData . rawBody ,
58+ rawBody ,
5459 undefined ,
5560 ( ) => this . headers
5661 ) ;
You can’t perform that action at this time.
0 commit comments