Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1029689 // serveCSVWithFileName

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5057L/36K).

1  
sO serveCSVWithFileName(S fileName, S text) {
2  
  O response = serveWithContentType(text, "text/csv");
3  
  call(response, "addHeader", "Content-Disposition", "inline; filename=\"" + fileName + "\"");
4  
  ret response;
5  
}

Author comment

Began life as a copy of #1029688

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029689
Snippet name: serveCSVWithFileName
Eternal ID of this version: #1029689/4
Text MD5: 52c144814ea2845aac5f8f696a32a8ed
Transpilation MD5: d920d6eeb3a13728c1f764d3e6b4cd9c
Author: stefan
Category: javax / web
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-07 14:48:32
Source code size: 217 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 217 / 319
Version history: 3 change(s)
Referenced in: [show references]