Develop Android WebDAV server

In my application, I have a nanohttpd server https://github.com/NanoHttpd/nanohttpd But now I want to add a WebDAV support. I'm looking for some tutorials or suggestions to do this, but I find that only the jackrabbit library has no tutorials or guides. Do you have any suggestions for me?

resolvent:

A few people have integrated Milton into their Android applications to add WebDAV server functions. See here- http://milton.io

The link to the tutorial is on the home page. There is nothing specific to Android, but it should be simple and clear

(according to the following comments on nanohttpd) to integrate with nanohttpd, you will need to implement the request and response interfaces to wrap the data from nanohttpd. You will need to create an instance of Miltons httpmanager and pass the request and response objects to the processing method of each request

Note that Milton is integrated with the ready-made simple HTTP container (called simpleton), so you can use it instead of nanohttpd. Just create an instance of io.milton.simpleton.simpleton server and call its start () method

If you want to use it, follow the simpleton implementation code as a guide to integrating with nanohttpd:

https://github.com/miltonio/milton2/tree/master/milton-server-ce/src/main/java/io/milton/simpleton

This shows a fairly typical integration from Io. Milton. Grizzly. Grizzlyserver. It's really simple

@Override
public void service(Request request, Response response) throws Exception {
    GrizzlyMiltonRequest req = new GrizzlyMiltonRequest(request);
    GrizzlyMiltonResponse resp = new GrizzlyMiltonResponse(response);
    httpManager.process(req, resp);
}

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>