mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #4] Serialize a request into JSON? #3
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#3
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?
Originally created by @banezaklan on GitHub (Aug 22, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4
Hey there, have you already planned for serializing entire request into JSON? I'm looking for a simple way to document a REST API, and make it "interactable" in the same time.
Like postman has these "Collections" but simpler I think...
@AndrewBastin commented on GitHub (Aug 22, 2019):
Hey....
That seems dope, I will work on a PR for that...
But can you clarify what you want ?
Do you want the ability to export the entire request config for a single request or for multiple requests ?
@brandonros commented on GitHub (Aug 28, 2019):
One idea is to store some state in the hash or query string of the URL, which would make sharing a request with other teammates a simple copy + paste away.
@AndrewBastin commented on GitHub (Aug 28, 2019):
@brandonros I like this suggestion, can you open this as a separate issue ?
I will start working on the PR.
@NBTX commented on GitHub (Aug 28, 2019):
The problem with that though is that the state would, for some more advanced queries be massive.
@AndrewBastin commented on GitHub (Aug 28, 2019):
We can introduce support for basic queries only (ie method, url, path) for now.
I think that would still be pretty helpful.
We could flush it out as we go...
@liyasthomas commented on GitHub (Aug 28, 2019):
Appending on hash or query string of the URL is the easiest way to do this, but in a long run, this would be painful. But as @brandonros said, this could be the easiest way to sahe it to others with copy/paste. #72 does the same approach.
Alternate option is export and import JSON. Which solves the case of complex or large queries but need further dependencies I suppose.
@brandonros commented on GitHub (Aug 28, 2019):
I'd argue for including headers too because of how important they are for authentication and how potentially useless requests are if you can't pass auth headers, etc. :)
I'd imagine you would only start running into grossness when you pass probably, the 16kb - 64kb range? Everything below that is probably fine.
https://postwoman.foo/?state={"model":{ ... }}or hash, if you prefer@jgroom33 commented on GitHub (Aug 30, 2019):
postman uses the concept of environment to store state. this works ok, but is limited because it is a string by default.
the cache should be a combination of responses, requests, and user defined vars
The UI should present each of these objects.
To reference any of these objects, a templating engine should be implemented. This would allow the following behavior:
@TheHollidayInn commented on GitHub (Oct 22, 2019):
I think that with my new collections PR, I could solve this issue since the requests are stored in vuex now. I could add a copy button to the requests that are saved and allow the user to get the json
@liyasthomas commented on GitHub (Oct 24, 2019):
#176 #209 fixes this. Hence closing.