mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #1842] Body is not stored at query vars when using "Copy link" feature #588
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#588
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 @manuman94 on GitHub (Sep 29, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1842
Originally assigned to: @mandaputtra on GitHub.
Describe the bug
I would like to use the Hoppscotch query string API to build Hoppscotch links in my application so we can debug REST calls from our HTTP test reports.
The idea behind is to make a "Play" button in our reports that link to a pre-filled Hoppscotch API tester. We already can do this but we can only fill "parameters" (query string), "headers", "method", and "endpoint". There is no such "body" parameter to pre-fill the body of the request.
To Reproduce
Open a new Hoppscotch session and fill endpoint, method, headers, parameters and body. You will see that the link at the address bar will include all of those information but the body part.
Expected behavior
Include "body" parameter with the url-encoded body value.
Additional context
I don't know if this is a bug report or a feature request since I don't know if this is made on purpose. But it seems weird for us that such as an important part as the body is not present at the Hoppscotch query vars API.
Thank you, greetings.
@liyasthomas commented on GitHub (Sep 29, 2021):
Hi @manuman94, thanks for reporting this issue. We'll be looking into fixing this as soon as possible.
@mandaputtra commented on GitHub (Oct 1, 2021):
I can take this issue if no one already work on this.
@liyasthomas commented on GitHub (Oct 1, 2021):
Hi @mandaputtra, you're free to take this issue. I'm assigning it to you, do let us know if you need any help.
@mandaputtra commented on GitHub (Oct 1, 2021):
Can you point me where you parse and set the query param on url bar?, I've lost track of it in here I can't find the code who responsible for updating the url bar.
@liyasthomas commented on GitHub (Oct 1, 2021):
Hi @mandaputtra, check out the below file on setting the request object to query parameters.
github.com/hoppscotch/hoppscotch@0f39d54c3c/packages/hoppscotch-app/helpers/types/HoppRESTRequest.ts (L83)@mandaputtra commented on GitHub (Oct 1, 2021):
Sorry to bother you again @liyasthomas 😄 I'm still confuse how do you change the query params on url bar here.
I see it binds on
params$but I dont see why It change the query parameters on the bar.@liyasthomas commented on GitHub (Oct 1, 2021):
Hi @mandaputtra, the code block you're looking for is this:
github.com/hoppscotch/hoppscotch@8f0538c886/packages/hoppscotch-app/pages/index.vue (L165-L171)QUICK NOTE: Read this article on StackOverflow to understand the limit of characters allowed in URL: What is the maximum length of a URL in different browsers?
@manuman94 commented on GitHub (Oct 4, 2021):
Thank you guys! This is awesome. Working pretty well and so fast!
Greetings.