Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-webdav

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-webdav

WebDAV library for Angular. The [WebDAV protocol](https://en.wikipedia.org/wiki/WebDAV) is an extension of the HTTP protocols with extra methods.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

angular-webdav

WebDAV library for Angular. The WebDAV protocol is an extension of the HTTP protocols with extra methods.

Consuming the library

$ yarn add angular-webdav

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { WebDAVModule } from 'angular-webdav';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    WebDAVModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
import { Component } from '@angular/core';
import {WebDAV, Header} from 'angular-webdav';

@Component({
  selector: 'my-app',
  template: `<h1>Hello {{name}}</h1>`,
})
export class AppComponent  { name = 'Angular';
    constructor(private webdav: WebDAV){
        const header =  new Headers();
        const url = 'https://your.url'
        header.append('Authorization', 'Basic '  + btoa('username:password'));
        //header.append('Destination', '${url}/newfile_directory');
        //header.append('Depth', '300');
        header.append('Content-Type', 'text/xml');

        const body=`
        <?xml version="1.0"?>
        <d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
          <d:set>
            <d:prop>
                        <d:lastmodified>Fri, 13 Feb 2015 00:00:00 GMT</d:lastmodified>
            </d:prop>
          </d:set>
        </d:propertyupdate>
        `
        // webdav.get(`${url}/Photos/Paris.jpg`, {headers: header})
        // webdav.mkcol(`${url}/newdir`, {headers: header})
        // webdav.move(`${url}/newdir`, {headers: header})
        // webdav.copy(`${url}/newdir`, {headers: header})
        // webdav.delete(`${url}/newdir2`, {headers: header})
        // webdav.propfind(`${url}/`, {headers: header})
        // webdav.put(`${url}/test`, body, {headers: header})
        webdav.proppatch(`${url}/test`, body, {headers: header})
                        .subscribe();
    }
}

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ git clone https://github.com/esanzgar/angular-webdav.git
$ cd angular-webdav
$ yarn
$ yarn build

To lint all *.ts files:

$ yarn lint

License

Apache-2.0 © Eduardo Sanz García

Keywords

FAQs

Package last updated on 06 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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