如何使用Camel从http GET获取文件名?
标题不会显示任何有用的内容,而且创建的文件名是动态生成的......
~/.config/google-assistant-*
示例:
2018-03-12 18:19:12.729 DEBUG 83572 --- [er://downloader] o.a.camel.component.http.HttpProducer : Executing http GET method: http://firds.esma.europa.eu/firds/DLTINS_20180312_01of01.zip
2018-03-12 18:19:12.777 DEBUG 83572 --- [er://downloader] o.a.camel.component.http.HttpProducer : Http responseCode: 200
2018-03-12 18:19:12.790 INFO 83572 --- [er://downloader] FIRDS Download : {Accept-Ranges=bytes, breadcrumbId=ID-MGR-MacBook-Space-local-1520875148898-0-1, CamelHttpMethod=GET, CamelHttpResponseCode=200, CamelHttpResponseText=OK, Content-Length=32723, Content-MD5=7t9wKjv9rUcwarKlfrKC7w==, Content-Type=application/octet-stream, Date=Mon, 12 Mar 2018 17:19:12 GMT, Etag="0x8D587B14BA2F5A1", firedTime=Mon Mar 12 18:19:12 CET 2018, Last-Modified=Mon, 12 Mar 2018 00:36:29 GMT, Server=ECAcc (sto/DB4C), Set-Cookie=citrix_ns_id=1wBsjlP8vQbSRF9tbnHZFAVg4IE0000; Domain=.esma.europa.eu; Path=/; Secure; HttpOnly, Strict-Transport-Security=max-age=157680000, X-Cache=HIT, x-ms-blob-type=BlockBlob, x-ms-lease-state=available, x-ms-lease-status=unlocked, x-ms-request-id=c3469ad7-001e-0022-6515-baa9f5000000, x-ms-version=2014-02-14}
2018-03-12 18:19:12.791 DEBUG 83572 --- [er://downloader] o.a.c.c.file.GenericFileProducer : Starting producer: Producer[file://input]
2018-03-12 18:19:12.791 DEBUG 83572 --- [er://downloader] org.apache.camel.impl.ProducerCache : Adding to producer cache with key: file://input for producer: Producer[file://input]
2018-03-12 18:19:12.791 DEBUG 83572 --- [er://downloader] o.a.c.processor.SendDynamicProcessor : >>>> file://input Exchange[ID-MGR-MacBook-Space-local-1520875148898-0-3]
2018-03-12 18:19:12.799 DEBUG 83572 --- [er://downloader] o.a.camel.component.file.FileOperations : Using InputStream to write file: input/ID-MGR-MacBook-Space-local-1520875148898-0-4
2018-03-12 18:19:12.806 DEBUG 83572 --- [er://downloader] o.a.c.c.file.GenericFileProducer : Wrote [input/ID-MGR-MacBook-Space-local-1520875148898-0-4] to [file://input]