Giter VIP home page Giter VIP logo

Comments (10)

AndrewBastin avatar AndrewBastin commented on May 22, 2024 3

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 ?

from hoppscotch.

brandonros avatar brandonros commented on May 22, 2024 2

We can introduce support for basic queries only (ie method, url, path) for now.

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

from hoppscotch.

TheHollidayInn avatar TheHollidayInn commented on May 22, 2024 2

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

from hoppscotch.

brandonros avatar brandonros commented on May 22, 2024 1

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.

from hoppscotch.

AndrewBastin avatar AndrewBastin commented on May 22, 2024

@brandonros I like this suggestion, can you open this as a separate issue ?

I will start working on the PR.

from hoppscotch.

NBTX avatar NBTX commented on May 22, 2024

The problem with that though is that the state would, for some more advanced queries be massive.

from hoppscotch.

AndrewBastin avatar AndrewBastin commented on May 22, 2024

The problem with that though is that the state would, for some more advanced queries be massive.

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...

from hoppscotch.

liyasthomas avatar liyasthomas commented on May 22, 2024

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.

from hoppscotch.

jgroom33 avatar jgroom33 commented on May 22, 2024

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:

  1. define a var of: foo={"model":{"foo":"bar"}}
  2. use var in a request: https://postwoman.foo/?state={{foo}}
  3. use response in subsequent request: https://postwoman.foo/blog/{{request1label.response.items[0].id}}

from hoppscotch.

liyasthomas avatar liyasthomas commented on May 22, 2024

#176 #209 fixes this. Hence closing.

from hoppscotch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.