BREAKING CHANGE(core): major architectural refactoring with fetch-like API
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
// Export the main client
|
||||
export { SmartRequestClient } from './smartrequestclient.js';
|
||||
|
||||
// Export response type from core
|
||||
export { SmartResponse } from '../core/index.js';
|
||||
|
||||
// Export types
|
||||
export type { HttpMethod, ResponseType, FormField, RetryConfig, TimeoutConfig } from './types/common.js';
|
||||
export {
|
||||
@@ -34,12 +37,12 @@ export function createFormClient<T = any>() {
|
||||
* Create a client pre-configured for binary data
|
||||
*/
|
||||
export function createBinaryClient<T = any>() {
|
||||
return SmartRequestClient.create<T>().responseType('binary');
|
||||
return SmartRequestClient.create<T>().accept('binary');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a client pre-configured for streaming
|
||||
*/
|
||||
export function createStreamClient() {
|
||||
return SmartRequestClient.create().responseType('stream');
|
||||
return SmartRequestClient.create().accept('stream');
|
||||
}
|
Reference in New Issue
Block a user