Comments (6)
@Ansh-Rathod ill have to investigate, however it should theoretically work, have you tried?
Cc @lesnitsky
from dart_edge.
@Ansh-Rathod ill have to investigate, however it should theoretically work, have you tried?
Cc @lesnitsky
yeah, i tried this, the major issue i think is it didn't added proper headers to request. every time headers was empty and response became 400 bad request.
from dart_edge.
Could you share the code? Will add a test case
from dart_edge.
@Ansh-Rathod how did you get this working? I can't find MultipartRequest anywhere in the edge library, and using the traditional http lib triggers
<ref *1> UnsupportedError {
message: "Cannot create a client without dart:html or dart:io.",
"$thrownJsError": <ref *2> Unsupported operation: Cannot create a client without dart:html or dart:io.
at Object.wrapException (file:///src/main.dart.js:698:17)
at Object.throwExpression (file:///src/main.dart.js:712:15)
at Object.createClient (file:///src/main.dart.js:6951:16)
at Object.Client_Client (file:///src/main.dart.js:6947:18)
at file:///src/main.dart.js:13071:26
at _wrapJsFunctionForAsync_closure.$protected (file:///src/main.dart.js:3324:15)
at _wrapJsFunctionForAsync_closure.call$2 (file:///src/main.dart.js:8780:12)
at Object._asyncStartSync (file:///src/main.dart.js:3288:20)
at MultipartRequest.send$0 (file:///src/main.dart.js:13076:16)
at file:///src/main.dart.js:14098:48 {
dartException: [Circular *1],
name: "",
"$cachedTrace": _StackTrace { _exception: [Circular *2], _trace: null }
}
}
and when trying with the provided fetch --
final mulitResponse = await edge.fetch(edge.Resource.request(httpRequest));
I see
The argument type 'MultipartRequest' can't be assigned to the parameter type 'Request'.dart[argument_type_not_assignable](https://dart.dev/diagnostics/argument_type_not_assignable)
nor does edge.fetch appear to support a StreamedResponse, which is what should be used in conjunction with MultipartRequest.
from dart_edge.
well, if you use runtimeclient with HTTP library.
from dart_edge.
well, if you use runtimeclient with HTTP library.
The problem is not with http, but the missing html/io libraries. Are you sure you got this working? Could you please share code? If it was not working for you please say so Invertase can prioritize this to be fixed.
I tried with
http.runWithClient(() => getResponse, () => EdgeHttpClient());
as well.
Any thoughts @Ehesp?
from dart_edge.
Related Issues (20)
- Support for Vercel Storage
- Runtime error when running `vercel dev`
- [BUG] Supabase: Cannot read request.body contents HOT 4
- How to fetch environment variables? HOT 2
- Send an email inside a Edge function HOT 4
- Support Firebase / GCP Cloud Functions
- How to send http request? HOT 1
- Migrate to `typings` as `js_bindings` is discontinued HOT 6
- An error occurred: NoSuchMethodError: method not found: 'constructor' on null
- Doesn't Work on Flutter Beta Channel HOT 12
- Following doc tutorial results in `Function not found` error message HOT 9
- Missing Documentation
- How to use it in Docker
- Cannot use `SupabaseClient` without dart:html or dart:io in Supabase Edge functions HOT 1
- Not working as per superbase Docs HOT 6
- Can't deploy my function: Error: NotFound: No such file or directory HOT 1
- Can I create a new DART edge project within an existing Flutter project? HOT 1
- [CANT'T Compile] Cant' build on dart Dart SDK version: 3.2.0 (stable) (Tue Nov 14 18:26:59 2023 +0000) on "linux_x64" ERROR MESSAGE Compilation of the Dart entry file failed: HOT 2
- edge is not able to execute dart to js commands in Ubuntu [ Linux OS] [ Supabase edge functions]
- Cloudflare Workers not working on Dart 3.3? HOT 1
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 dart_edge.