Cleanuop and CORS fixing
This commit is contained in:
@@ -50,9 +50,14 @@ class APIClient {
|
||||
*/
|
||||
async request(endpoint, options = {}) {
|
||||
const url = `${this.baseURL}${endpoint}`;
|
||||
|
||||
// Merge options, with custom headers taking precedence
|
||||
const config = {
|
||||
headers: { ...this.headers },
|
||||
...options
|
||||
...options,
|
||||
headers: {
|
||||
...this.headers,
|
||||
...(options.headers || {})
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user