@@ -13,7 +13,9 @@ class Rhttp {
1313
1414 /// Initializes the Rust library.
1515 static Future <void > init () async {
16- await RustLib .init ();
16+ await RustLib .init (
17+ forceSameCodegenVersion: false ,
18+ );
1719 }
1820
1921 /// Makes an HTTP request.
@@ -48,8 +50,7 @@ class Rhttp {
4850
4951 /// Similar to [request] , but uses a [BaseHttpRequest] object
5052 /// instead of individual parameters.
51- static Future <HttpResponse > send (
52- BaseHttpRequest request, {
53+ static Future <HttpResponse > send (BaseHttpRequest request, {
5354 ClientSettings ? settings,
5455 List <Interceptor >? interceptors,
5556 }) =>
@@ -148,8 +149,7 @@ class Rhttp {
148149 }
149150
150151 /// Alias for [getText] .
151- static Future <HttpTextResponse > get (
152- String url, {
152+ static Future <HttpTextResponse > get (String url, {
153153 ClientSettings ? settings,
154154 List <Interceptor >? interceptors,
155155 Map <String , String >? query,
@@ -169,8 +169,7 @@ class Rhttp {
169169 );
170170
171171 /// Makes an HTTP GET request and returns the response as text.
172- static Future <HttpTextResponse > getText (
173- String url, {
172+ static Future <HttpTextResponse > getText (String url, {
174173 ClientSettings ? settings,
175174 List <Interceptor >? interceptors,
176175 Map <String , String >? query,
@@ -190,8 +189,7 @@ class Rhttp {
190189 );
191190
192191 /// Makes an HTTP GET request and returns the response as bytes.
193- static Future <HttpBytesResponse > getBytes (
194- String url, {
192+ static Future <HttpBytesResponse > getBytes (String url, {
195193 ClientSettings ? settings,
196194 List <Interceptor >? interceptors,
197195 Map <String , String >? query,
@@ -211,8 +209,7 @@ class Rhttp {
211209 );
212210
213211 /// Makes an HTTP GET request and returns the response as a stream.
214- static Future <HttpStreamResponse > getStream (
215- String url, {
212+ static Future <HttpStreamResponse > getStream (String url, {
216213 ClientSettings ? settings,
217214 List <Interceptor >? interceptors,
218215 Map <String , String >? query,
@@ -233,8 +230,7 @@ class Rhttp {
233230
234231 /// Makes an HTTP POST request and returns the response as text.
235232 /// Use [requestBytes] , or [requestStream] for other response types.
236- static Future <HttpTextResponse > post (
237- String url, {
233+ static Future <HttpTextResponse > post (String url, {
238234 ClientSettings ? settings,
239235 List <Interceptor >? interceptors,
240236 Map <String , String >? query,
@@ -259,8 +255,7 @@ class Rhttp {
259255
260256 /// Makes an HTTP PUT request and returns the response as text.
261257 /// Use [requestBytes] , or [requestStream] for other response types.
262- static Future <HttpTextResponse > put (
263- String url, {
258+ static Future <HttpTextResponse > put (String url, {
264259 ClientSettings ? settings,
265260 List <Interceptor >? interceptors,
266261 Map <String , String >? query,
@@ -285,8 +280,7 @@ class Rhttp {
285280
286281 /// Makes an HTTP DELETE request and returns the response as text.
287282 /// Use [requestBytes] , or [requestStream] for other response types.
288- static Future <HttpTextResponse > delete (
289- String url, {
283+ static Future <HttpTextResponse > delete (String url, {
290284 ClientSettings ? settings,
291285 List <Interceptor >? interceptors,
292286 Map <String , String >? query,
@@ -311,8 +305,7 @@ class Rhttp {
311305
312306 /// Makes an HTTP HEAD request and returns the response as text.
313307 /// Use [requestBytes] , or [requestStream] for other response types.
314- static Future <HttpTextResponse > head (
315- String url, {
308+ static Future <HttpTextResponse > head (String url, {
316309 ClientSettings ? settings,
317310 List <Interceptor >? interceptors,
318311 Map <String , String >? query,
@@ -333,8 +326,7 @@ class Rhttp {
333326
334327 /// Makes an HTTP PATCH request and returns the response as text.
335328 /// Use [requestBytes] , or [requestStream] for other response types.
336- static Future <HttpTextResponse > patch (
337- String url, {
329+ static Future <HttpTextResponse > patch (String url, {
338330 ClientSettings ? settings,
339331 List <Interceptor >? interceptors,
340332 Map <String , String >? query,
@@ -359,8 +351,7 @@ class Rhttp {
359351
360352 /// Makes an HTTP OPTIONS request and returns the response as text.
361353 /// Use [requestBytes] , or [requestStream] for other response types.
362- static Future <HttpTextResponse > options (
363- String url, {
354+ static Future <HttpTextResponse > options (String url, {
364355 ClientSettings ? settings,
365356 List <Interceptor >? interceptors,
366357 Map <String , String >? query,
@@ -385,8 +376,7 @@ class Rhttp {
385376
386377 /// Makes an HTTP TRACE request and returns the response as text.
387378 /// Use [requestBytes] , or [requestStream] for other response types.
388- static Future <HttpTextResponse > trace (
389- String url, {
379+ static Future <HttpTextResponse > trace (String url, {
390380 ClientSettings ? settings,
391381 List <Interceptor >? interceptors,
392382 Map <String , String >? query,
0 commit comments