Comments (12)
should be fairly simple and straightforward with browserify ... if I remove all the require-directory
dependencies ... (which I'm planning to do, but PRs are also welcome)
it gets complicated with the tests because of require-directory
, but otherwise, no special dependencies ...
are you asking for stoplight.io?
from httpsnippet.
Yes indeed! Doing some investigating, and was curious. Is this something you were/are planning to do? We might have time to tackle this in the next couple of months. I just haven't had a chance to look through the code and was curious what you thought the scope of work involved might look like.
from httpsnippet.
yep, I have a branch locally, to remove require-directory
but wasn't a priority so far ...
whoever, gets to it first maybe? :)
would love to chat more about stoplight.io, very interested in playing, also perhaps some room for collaboration with Mashape ... can take this convo offline / email.
from httpsnippet.
Not a huge priority for us either just yet - right now we're firmly in the desktop environment, with access to node. That said, I could see this easily becoming the defacto http code gen library with browser support. Would be awesome :).
Absolutely, would love to chat! Shoot me a note marc [at] stoplight.io when you have a moment.
from httpsnippet.
okay, so I looked at my code and it wasn't that much more left, so I wrapped it up and released under v1.16.4
(removing dependency on require-directory
)
this should make it work with Browserify now, but I haven't tested it ... 99% certain everything will work though ... (famous last words) 😉
will send you email to chat further
from httpsnippet.
👍 awesome! Will play around with a browser version in the next month or so. Thanks a bunch.
Looking forward to chatting.
from httpsnippet.
@marbemac Did you managed to run httpsnippet in browser?
I'm getting this error continuously with browserify:
Error: Cannot find module '../../is-buffer/index.js' from '/private/tmp'
at /private/tmp/node_modules/resolve/lib/async.js:55:21
at load (/private/tmp/node_modules/resolve/lib/async.js:69:43)
at onex (/private/tmp/node_modules/resolve/lib/async.js:92:31)
at /private/tmp/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:117:15)
from httpsnippet.
Okay, it seems webpack can do this without any problem.
from httpsnippet.
@mxr576 if you do a production
install, it would not need the filesystem dependency ...
https://github.com/Mashape/httpsnippet/blob/master/package.json#L74
from httpsnippet.
I've found other issue with this library. FormData refers to HTML5's FormData and it cannot be overridden properly in browsers (or at least I wasn't able to do that). But as I can see this module isn't a hard dependency of this module so it could be removed, what do you think?
mxr576@a968e69
mxr576@f6b6d92
Should I create a Pull request from these commits?
Browserify is still not working properly on this library for me, but webpack works fine.
from httpsnippet.
@mxr576 I left a comment there, using FormData
will ONLY work in the browser, not sure that's a good approach.
from httpsnippet.
You're right of course, here is a new, more "cross-platform-ish" solution to this problem: mxr576@4542425
from httpsnippet.
Related Issues (20)
- Support directly generating Postman Collections JSON
- YouTube videos for play station 3 enable JavaScript
- C# RestSharp is using deprecated syntax HOT 2
- Wiki is empty HOT 1
- future plan to add typescript?
- why is the difference between the code generated in postman and by httpsnippet? HOT 1
- Can you make a new release on npm please? HOT 1
- Typescript error when `postData` is missing HOT 2
- Update README.md and Wiki HOT 1
- does not work with vite HOT 1
- Generate Robot Framework
- Maintainer activity HOT 7
- Content-Length invalid for unicode text HOT 1
- Support line wrap or fixed width in generated code snippet string
- Error: strict mode: unknown keyword: "afterRequest" HOT 2
- New Version HOT 4
- Error: TypeError - Cannot read properties of undefined (reading 'toString') HOT 1
- Support for Crystal Language Code Generation
- I try to generate HTTP Snippet Code for Download File from Server, but I'm not able to download file because my HTTP Request Snippet is incomplete
- BUG: Http default clientId error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httpsnippet.