use promisedRequest for theme resource fetching
This commit is contained in:
parent
436db2a9d8
commit
4b3ad72b31
2 changed files with 21 additions and 15 deletions
|
|
@ -71,6 +71,7 @@ export const promisedRequest = async ({
|
|||
url,
|
||||
payload,
|
||||
formData,
|
||||
cache,
|
||||
credentials,
|
||||
headers = {},
|
||||
}) => {
|
||||
|
|
@ -87,6 +88,10 @@ export const promisedRequest = async ({
|
|||
options.headers['Content-Type'] = 'application/json'
|
||||
}
|
||||
|
||||
if (cache) {
|
||||
options.cache = cache
|
||||
}
|
||||
|
||||
if (formData || payload) {
|
||||
options.body = formData || JSON.stringify(payload)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue