mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
13 lines
336 B
TypeScript
13 lines
336 B
TypeScript
import { HEADERS } from '../api/core/request';
|
|
|
|
/**
|
|
* Returns the response headers of the response received by the generated API client.
|
|
*/
|
|
export const getHeaders = (response: any): Record<string, string> => {
|
|
if (!(HEADERS in response)) {
|
|
throw new Error('Response does not have headers');
|
|
}
|
|
|
|
return response[HEADERS];
|
|
};
|