You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-27 23:28:38 +02:00
Clean up
This commit is contained in:
@ -337,16 +337,16 @@ class WebDavApi {
|
||||
async exec(method, path = '', body = null, headers = null, options = null) {
|
||||
headers = Object.assign({}, headers);
|
||||
options = Object.assign({}, options);
|
||||
|
||||
|
||||
if (!options.responseFormat) options.responseFormat = 'json';
|
||||
if (!options.target) options.target = 'string';
|
||||
|
||||
const authToken = this.authToken();
|
||||
|
||||
if (authToken) headers['Authorization'] = `Basic ${authToken}`;
|
||||
|
||||
|
||||
// That should not be needed, but it is required for React Native 0.63+
|
||||
// https://github.com/facebook/react-native/issues/30176
|
||||
// https://github.com/facebook/react-native/issues/30176
|
||||
if (!headers['Content-Type']) {
|
||||
if (method === 'PROPFIND') headers['Content-Type'] = 'text/xml';
|
||||
if (method === 'PUT') headers['Content-Type'] = 'text/plain';
|
||||
|
Reference in New Issue
Block a user