mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:18:30 +02:00
Postman text body import
This commit is contained in:
@@ -191,6 +191,20 @@ function importBody(rawBody: any): Pick<HttpRequest, 'body' | 'bodyType' | 'head
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
} else if ('raw' in body) {
|
||||||
|
return {
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
name: 'Content-Type',
|
||||||
|
value: body.options?.raw?.language === 'json' ? 'application/json' : '',
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bodyType: body.options?.raw?.language === 'json' ? 'application/json' : 'other',
|
||||||
|
body: {
|
||||||
|
text: body.raw ?? '',
|
||||||
|
},
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
// TODO: support other body types
|
// TODO: support other body types
|
||||||
return { headers: [], bodyType: null, body: {} };
|
return { headers: [], bodyType: null, body: {} };
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Yaak",
|
"productName": "Yaak",
|
||||||
"version": "2024.3.9"
|
"version": "2024.3.10"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"windows": [],
|
"windows": [],
|
||||||
|
|||||||
Reference in New Issue
Block a user