-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat,dep: add response handling and UI layout
- Loading branch information
1 parent
61b94a3
commit e6d7c17
Showing
13 changed files
with
149 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script setup lang="ts"> | ||
import {computed} from 'vue' | ||
const model = defineModel<any>() | ||
const body = computed(()=>atob(model.value?.responseBody)) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
{{ body }}123 | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
25 changes: 25 additions & 0 deletions
25
client/components/editors/http/response/ResponseHeader.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script setup lang="ts"> | ||
import {computed} from 'vue' | ||
import Column from "primevue/column"; | ||
import DataTable from "primevue/datatable"; | ||
const model = defineModel<any>(); | ||
const headers = computed(()=>Object.entries(model.value?.responseHeaders ?? {}).map(t=>({ | ||
name:t[0], | ||
value:t[1] | ||
}))) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<DataTable :value="headers"> | ||
<Column field="name" header="Name"></Column> | ||
<Column field="value" header="Value"></Column> | ||
</DataTable> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup lang="ts"> | ||
import DataTable from "primevue/datatable"; | ||
import Column from "primevue/column"; | ||
import {computed} from 'vue' | ||
const stackTrace = ` at REPL31:1:7 | ||
at ContextifyScript.runInThisContext (node:vm:121:12) | ||
at REPLServer.defaultEval (node:repl:599:22) | ||
at bound (node:domain:432:15) | ||
at REPLServer.runBound (node:domain:443:12) | ||
at REPLServer.p [as eval] (file:///C:/Users/TimeBather/AppData/Roaming/npm/node_modules/tsx/dist/loader.mjs:1:786) | ||
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)` | ||
const stack = computed(()=>stackTrace.split('\n').map(t=>({name:t}))) | ||
</script> | ||
|
||
<template> | ||
<DataTable :value="stack"> | ||
<Column field="name" header="Name"></Column> | ||
</DataTable> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters