Skip to content

Added request mode within BrowserClient #1719

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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9ba5471
Update README.md
seifibrahim32 Mar 13, 2024
ee01325
Merge branch 'dart-lang:master' into master
seifibrahim32 Jan 31, 2025
3a26def
Added caching options for http package
seifibrahim32 Feb 2, 2025
3ba65df
Enabled lints
seifibrahim32 Feb 2, 2025
f5c9c11
Fixed CI errors
seifibrahim32 Feb 2, 2025
52ff2c5
Changed from HttpCacheUtils to HttpCacheOptions
seifibrahim32 Feb 2, 2025
7f70434
Reverted readme file
seifibrahim32 Feb 3, 2025
ae7be97
Reverted to last commits for request files
seifibrahim32 Feb 3, 2025
1ca0c3a
Reformated the committed files
seifibrahim32 Feb 3, 2025
7a5c30d
Changed values
seifibrahim32 Feb 3, 2025
85daade
Passing CI stages
seifibrahim32 Feb 3, 2025
7ece5aa
Changed the parameter to String type
seifibrahim32 Feb 4, 2025
4bca978
Reverted utils.dart
seifibrahim32 Feb 5, 2025
dad889c
Changed CacheMode from utils to browser_client file
seifibrahim32 Feb 5, 2025
2889cb2
Enhanced BrowserClient class
seifibrahim32 Feb 5, 2025
3d17957
Formatted for CI passover
seifibrahim32 Feb 5, 2025
a1f47db
Export CacheMode
seifibrahim32 Feb 6, 2025
cab59fc
Added some cache tests
seifibrahim32 Feb 11, 2025
5831578
Reverted utils.dart
seifibrahim32 Feb 11, 2025
2fd11c1
Reverted stub server
seifibrahim32 Feb 11, 2025
53dc82f
Add tests cache including fixing CI passover
seifibrahim32 Feb 12, 2025
1adce3e
Updated the branch fork
seifibrahim32 Feb 16, 2025
7d50328
Update browser_client with formatted style
seifibrahim32 Feb 16, 2025
0149cd8
Added mode WIP
seifibrahim32 Feb 19, 2025
b51a95c
Added mode WIP v.1
seifibrahim32 Feb 19, 2025
fd511c4
Added mode WIP v.2
seifibrahim32 Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed CI errors
  • Loading branch information
seifibrahim32 committed Feb 2, 2025
commit f5c9c11fab5afea244e2022642a970e8f2d2caba
10 changes: 5 additions & 5 deletions pkgs/http/lib/src/multipart_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ class MultipartRequest extends BaseRequest {

@override
String? get cache {
if (this._cache != null) {
return this._cache;
} else
return super.cache;
if (_cache != null) {
return _cache;
}
return super.cache;
}

String? _cache;
set cache(String? cacheType) {
this._cache = cacheType!;
_cache = cacheType!;
}
}
10 changes: 5 additions & 5 deletions pkgs/http/lib/src/request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ class Request extends BaseRequest {

@override
String? get cache {
if (this._cache != null) {
return this._cache;
} else
return super.cache;
if (_cache != null) {
return _cache;
}
return super.cache;
}

String? _cache;
set cache(String? cacheType) {
this._cache = cacheType!;
_cache = cacheType!;
}
}
10 changes: 5 additions & 5 deletions pkgs/http/lib/src/streamed_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ class StreamedRequest extends BaseRequest {

@override
String? get cache {
if (this._cache != null) {
return this._cache;
} else
return super.cache;
if (_cache != null) {
return _cache;
}
return super.cache;
}

String? _cache;
set cache(String? cacheType) {
this._cache = cacheType!;
_cache = cacheType!;
}
}
12 changes: 6 additions & 6 deletions pkgs/http/lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Stream<T> onDone<T>(Stream<T> stream, void Function() onDone) =>
///
/// For more references, check (Caching types)[https://developer.mozilla.org/en-US/docs/Web/API/Request/cache]
mixin HttpCacheUtils {
static const String defaultType = "default";
static const String reloadType = "reload";
static const String noStoringType = "no-store";
static const String noCachingType = "no-cache";
static const String forceCachingType = "force-cache";
static const String onlyIfCachedType = "only-if-cached";
static const String defaultType = 'default';
static const String reloadType = 'reload';
static const String noStoringType = 'no-store';
static const String noCachingType = 'no-cache';
static const String forceCachingType = 'force-cache';
static const String onlyIfCachedType = 'only-if-cached';
}