Repository navigation
File Download #4320
Answered
by
timotheeguerin
Jawsome Rodeo (yeaharh)
asked this question in
Q&A
File Download
#4320
|
Hi We're building an OpenAPI compliant API that will return a pdf file from a get request. Rgds |
Answered by
timotheeguerin
Sep 3, 2024
Replies: 1 comment 3 replies
|
You can do that by setting the content type and the body to be import "@typespec/http";
using TypeSpec.Http;
op download(): {
@header contentType: "application/pdf";
@body file: bytes;
}; |
3 replies
Answer selected by
yeaharh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do that by setting the content type and the body to be
bytesPlayground