mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #955] [MERGED] Binary Responses & Response Lenses #2969
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2969
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/955
Author: @AndrewBastin
Created: 6/21/2020
Status: ✅ Merged
Merged: 7/15/2020
Merged by: @AndrewBastin
Base:
master← Head:feat/binary-response📝 Commits (10+)
7911d17Initial lens implementationac323c9Fixed activating multiple tabs on initial load923102aFixing CI Build0acb5c6Fixing CI Buildb44ba30Actions for RAW responsese04e82eActions for JSON responsesb227943Actions for HTML responsesd81306aActions for HTML responsesbfcb072Merge branch 'feat/binary-response' of https://github.com/AndrewBastin/postwoman into feat/binary-responsed31da4aRemoved redundant HTML response type check for preview code📊 Changes
28 files changed (+1174 additions, -548 deletions)
View changed files
📝
assets/css/styles.scss(+5 -5)📝
components/collections/index.vue(+1 -4)📝
components/environments/editEnvironment.vue(+0 -12)📝
components/environments/index.vue(+1 -4)📝
components/layout/history.vue(+2 -2)➕
components/lenses/ResponseBodyRenderer.vue(+44 -0)➕
components/lenses/headers.vue(+17 -0)➕
components/lenses/renderers/HTMLLensRenderer.vue(+153 -0)➕
components/lenses/renderers/ImageLensRenderer.vue(+102 -0)➕
components/lenses/renderers/JSONLensRenderer.vue(+149 -0)➕
components/lenses/renderers/RawLensRenderer.vue(+134 -0)➕
components/lenses/renderers/XMLLensRenderer.vue(+125 -0)➕
components/lenses/renderers/mixins/TextContentRendererMixin.js(+10 -0)➖
directives/textareaAutoHeight.js(+0 -8)➕
helpers/lenses/htmlLens.js(+8 -0)➕
helpers/lenses/imageLens.js(+16 -0)➕
helpers/lenses/jsonLens.js(+8 -0)➕
helpers/lenses/lenses.js(+37 -0)➕
helpers/lenses/rawLens.js(+8 -0)➕
helpers/lenses/xmlLens.js(+8 -0)...and 8 more files
📄 Description
This PR brings in two major updates to Postwoman both dealing with how we parse responses.
The first major update is the switch to binary responses for data. The current response system expects only string responses and acts really funky for binary responses. The new response system expects data to be stored in pure ArrayBuffer objects. The implementation for this is ongoing and the dependent like the Browser Extensions and Proxywoman are expected to be updated to comply with the system.
The second major update deals with a change in how we present responses. Certain responses, especially those with binary content expect a special way to render contents the current implementation for specializing for different types of contents are not really extensible to allow support for these varied and completely different response types. Hence, a concept of a Response Lens is being introduced, it is simply an extensible mechanism to give certain Content Types to specify a special way to render and allow multiple ways of representation for the same data. The Lens system expects the response data to be represented in the new response system.
This PR intends to fix #929.
Deploy preview: https://deploy-preview-955--postwoman.netlify.app
MVP
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.