Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Request Tool #837

Open
Trip7274 opened this issue Jan 14, 2024 · 6 comments · May be fixed by #1168
Open

HTTP Request Tool #837

Trip7274 opened this issue Jan 14, 2024 · 6 comments · May be fixed by #1168
Assignees
Labels

Comments

@Trip7274
Copy link

What tool do you want?
Example: an HTTP request tool

Describe the solution you'd like
A simple, powerful, and easily shareable HTTP request tool, where you can also export the request in curl format, or even a few popular languages

Is their example of this tool in the wild?
Cyberchef has a good implementation, but I found it doesn't work very well with some requests for some reason, namely Cloudflare API calls

Additional context
Having a "share" button maybe nice, along with a warning if you had any authorization headers to avoid leaking your tokens, but that's not a requirement for it to be an amazing tool

@sharevb
Copy link
Contributor

sharevb commented May 9, 2024

Hi @iGamerTrip, this is not really possible from a browser, JS cannot access everywhere, will require a local application or server side, so probably not the goal of this project

But a curl command generator could be possible

@Trip7274
Copy link
Author

While i dont know a lot about JS, I've noticed that Cyberchef does have that functionality from the browser, and so does Postman

It also doesn't necessarily need to be able to access everywhere, just public APIs and the like
Postman seems to suggest fetch() for JS, and here's an example code snippet it provided:

const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.sampleapis.com/switch/games", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result)) // Returns a list of Switch games!
  .catch((error) => console.error(error));

I apologize if this is simply unfeasible, or if I'm misunderstanding things, as my area of expertise lies moreso in Python than JS, but I thought this might help get my point across

@sharevb
Copy link
Contributor

sharevb commented May 11, 2024

Hi, yes, for api calls, (supposing CORS policy is ok), but will not work for websites as JS is not allowed to call everywhere (security)

By the way curl generator and translation to langages is possible

@Trip7274
Copy link
Author

Yeah, a better name for this issue is probably "API Request Tool", as it'd be good to test APIs (with proper CORS policies) with
And a curl/popular languages generator would be really cool as well!

sharevb added a commit to sharevb/it-tools that referenced this issue Jun 16, 2024
@sharevb sharevb linked a pull request Jun 16, 2024 that will close this issue
@sharevb
Copy link
Contributor

sharevb commented Jun 16, 2024

HI @Trip7274 and @CorentinTh, implemented i #1168

@Trip7274
Copy link
Author

Thanks a ton!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants