mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 10:49:49 +08:00
Expand streaming response types and subtypes
Added more constants for streaming-related MIME subtypes and updated kStreamingResponseTypes to include additional formats. This improves support for various streaming response types in the networking package.
This commit is contained in:
@@ -56,13 +56,6 @@ enum HTTPVerb {
|
||||
final String abbr;
|
||||
}
|
||||
|
||||
List<String> kStreamingResponseTypes = [
|
||||
'text/event-stream',
|
||||
'application/x-ndjson',
|
||||
'application/json-seq',
|
||||
'application/octet-stream',
|
||||
];
|
||||
|
||||
enum SupportedUriSchemes { https, http }
|
||||
|
||||
final kSupportedUriSchemes = SupportedUriSchemes.values
|
||||
@@ -96,6 +89,15 @@ const kSubTypeYaml = 'yaml';
|
||||
const kSubTypeXYaml = 'x-yaml';
|
||||
const kSubTypeYml = 'x-yml';
|
||||
const kSubTypeXWwwFormUrlencoded = 'x-www-form-urlencoded';
|
||||
const kSubTypeXNdjson = 'x-ndjson';
|
||||
const kSubTypeNdjson = 'ndjson';
|
||||
const kSubTypeJsonSeq = 'json-seq';
|
||||
const kSubTypeXLdjson = 'x-ldjson';
|
||||
const kSubTypeLdjson = 'ldjson';
|
||||
const kSubTypeXJsonStream = 'x-json-stream';
|
||||
const kSubTypeJsonStream = 'json-stream';
|
||||
const kSubTypeJsonstream = 'jsonstream';
|
||||
const kSubTypeStreamJson = 'stream+json';
|
||||
|
||||
const kTypeText = 'text';
|
||||
// text
|
||||
@@ -108,6 +110,7 @@ const kSubTypePlain = 'plain';
|
||||
const kSubTypeTextXml = 'xml';
|
||||
const kSubTypeTextYaml = 'yaml';
|
||||
const kSubTypeTextYml = 'yml';
|
||||
const kSubTypeEventStream = 'event-stream';
|
||||
|
||||
const kTypeImage = 'image';
|
||||
//image
|
||||
@@ -121,6 +124,19 @@ const kSubTypeFormData = "form-data";
|
||||
|
||||
const kSubTypeDefaultViewOptions = 'all';
|
||||
|
||||
List<String> kStreamingResponseTypes = [
|
||||
'$kTypeText/$kSubTypeEventStream',
|
||||
'$kTypeApplication/$kSubTypeXNdjson',
|
||||
'$kTypeApplication/$kSubTypeNdjson',
|
||||
'$kTypeApplication/$kSubTypeJsonSeq',
|
||||
'$kTypeApplication/$kSubTypeXLdjson',
|
||||
'$kTypeApplication/$kSubTypeLdjson',
|
||||
'$kTypeApplication/$kSubTypeXJsonStream',
|
||||
'$kTypeApplication/$kSubTypeJsonStream',
|
||||
'$kTypeApplication/$kSubTypeJsonstream',
|
||||
'$kTypeApplication/$kSubTypeStreamJson',
|
||||
];
|
||||
|
||||
enum ContentType {
|
||||
json("$kTypeApplication/$kSubTypeJson"),
|
||||
text("$kTypeText/$kSubTypePlain"),
|
||||
|
||||
Reference in New Issue
Block a user