New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webdav

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdav - npm Package Compare versions

Comparing version 2.9.1 to 2.10.0

dist/interface/custom.js

31

API.md

@@ -165,2 +165,3 @@ ## Modules

* [.createWriteStream(remoteFilename, [options])](#ClientInterface.createWriteStream) ⇒ <code>Writeable</code>
* [.customRequest(remotePath, [requestOptions], [options])](#ClientInterface.customRequest) ⇒ <code>Promise.&lt;Any&gt;</code>
* [.deleteFile(remotePath, [options])](#ClientInterface.deleteFile) ⇒ <code>Promise</code>

@@ -247,2 +248,27 @@ * [.getDirectoryContents(remotePath, [options])](#ClientInterface.getDirectoryContents) ⇒ <code>Promise.&lt;Array.&lt;Stat&gt;&gt;</code>

```
<a name="ClientInterface.customRequest"></a>
### ClientInterface.customRequest(remotePath, [requestOptions], [options]) ⇒ <code>Promise.&lt;Any&gt;</code>
Send a custom request
**Kind**: static method of [<code>ClientInterface</code>](#ClientInterface)
**Returns**: <code>Promise.&lt;Any&gt;</code> - A promise that resolves with response of the request
| Param | Type | Description |
| --- | --- | --- |
| remotePath | <code>String</code> | The remote path |
| [requestOptions] | [<code>RequestOptions</code>](#RequestOptions) | the request options |
| [options] | <code>Options</code> | Options for the request |
**Example**
```js
const contents = await client.customRequest("/alrighty.jpg", {
method: "PROPFIND",
headers: {
Accept: "text/plain",
Depth: 0
},
responseType: "text"
});
```
<a name="ClientInterface.deleteFile"></a>

@@ -496,3 +522,4 @@

| [headers] | <code>Object</code> | Set additional request headers |
| [withCredentials] | <code>Boolean</code> | Set whether or not credentials should be included with the request. Defaults to value used by axios. |
| [withCredentials] | <code>Boolean</code> | Set whether or not credentials should |
| data | <code>Object</code> \| <code>String</code> \| <code>\*</code> | Set additional body be included with the request. Defaults to value used by axios. |

@@ -512,3 +539,3 @@ <a name="RequestOptions"></a>

| [httpsAgent] | <code>Object</code> | A HTTPS agent interface |
| body | <code>Object</code> \| <code>String</code> \| <code>\*</code> | Body data for the request |
| data | <code>Object</code> \| <code>String</code> \| <code>\*</code> | Body data for the request |
# WebDAV-Client changelog
## v2.10.0
_2019-10-12_
* [#174](https://github.com/perry-mitchell/webdav-client/pull/174) `customRequest` method for making custom requests
## v2.9.1

@@ -4,0 +9,0 @@ _2019-07-07_

@@ -14,2 +14,3 @@ "use strict";

const createStream = require("./interface/createStream.js");
const custom = require("./interface/custom.js");
const deletion = require("./interface/delete.js");

@@ -198,2 +199,24 @@ const getFile = require("./interface/getFile.js");

/**
* Send a custom request
* @param {String} remotePath The remote path
* @param {RequestOptions=} requestOptions the request options
* @param {Options=} options Options for the request
* @memberof ClientInterface
* @returns {Promise<Any>} A promise that resolves with response of the request
* @example
* const contents = await client.customRequest("/alrighty.jpg", {
* method: "PROPFIND",
* headers: {
* Accept: "text/plain",
* Depth: 0
* },
* responseType: "text"
* });
*/
customRequest: function customRequest(remotePath, requestOptions, options) {
const customOptions = merge(runtimeOptions, options || {});
return custom.customRequest(remotePath, requestOptions, customOptions);
},
/**
* Delete a remote file

@@ -200,0 +223,0 @@ * @param {String} remotePath The remote path to delete

3

dist/interface/stat.js

@@ -67,3 +67,4 @@ "use strict";

module.exports = {
getStat
getStat,
parseStat
};

@@ -31,2 +31,3 @@ "use strict";

* @property {Boolean=} withCredentials - Set whether or not credentials should
* @property {Object|String|*=} data - Set additional body
* be included with the request. Defaults to value used by axios.

@@ -47,2 +48,5 @@ */

}
if (methodOptions.data) {
requestOptions.data = methodOptions.data;
}
if (methodOptions.headers && typeof methodOptions.headers === "object") {

@@ -73,3 +77,3 @@ requestOptions.headers = merge(requestOptions.headers || {}, methodOptions.headers);

* @property {Object=} httpsAgent - A HTTPS agent interface
* @property {Object|String|*=} body - Body data for the request
* @property {Object|String|*=} data - Body data for the request
*/

@@ -76,0 +80,0 @@

{
"name": "webdav",
"version": "2.9.1",
"version": "2.10.0",
"description": "WebDAV client for NodeJS",

@@ -72,3 +72,3 @@ "main": "dist/index.js",

"jsdoc-to-markdown": "^5.0.0",
"karma": "^4.1.0",
"karma": "^3.1.4",
"karma-chai": "^0.1.0",

@@ -87,3 +87,3 @@ "karma-chrome-launcher": "^2.2.0",

"sinon": "^7.3.2",
"wait-on": "^3.2.0",
"wait-on": "~3.2.0",
"webdav-server": "^2.4.6",

@@ -90,0 +90,0 @@ "webpack": "^4.35.2",

@@ -5,3 +5,3 @@ ![WebDAV](https://raw.githubusercontent.com/perry-mitchell/webdav-client/master/webdav.jpg)

[![Build Status](https://travis-ci.org/perry-mitchell/webdav-client.svg?branch=master)](https://travis-ci.org/perry-mitchell/webdav-client) [![npm version](https://badge.fury.io/js/webdav.svg)](https://www.npmjs.com/package/webdav) [![monthly downloads](https://img.shields.io/npm/dm/webdav.svg)](https://www.npmjs.com/package/webdav)
[![Build Status](https://travis-ci.org/perry-mitchell/webdav-client.svg?branch=master)](https://travis-ci.org/perry-mitchell/webdav-client) [![npm version](https://badge.fury.io/js/webdav.svg)](https://www.npmjs.com/package/webdav) [![monthly downloads](https://img.shields.io/npm/dm/webdav.svg)](https://www.npmjs.com/package/webdav) [![total downloads](https://img.shields.io/npm/dt/webdav.svg?label=total%20downloads)](https://www.npmjs.com/package/webdav)

@@ -254,2 +254,17 @@ ## About

### Custom requests
Custom requests can be made to the attached host:
```javascript
const contents = await client.customRequest("/alrighty.jpg", {
method: "PROPFIND",
headers: {
Accept: "text/plain",
Depth: 0
},
responseType: "text"
});
```
### Returned data structures

@@ -256,0 +271,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc