-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Labels
Description
Given an OpenAPI operation that returns an application/octet-stream media type as the response:
openapi: 3.0.1
info:
title: Me
description: Gets details about me!
version: 1.0.0
servers:
- url: https://test.azurewebsites.net/
paths:
'/me/photo/$value':
get:
tags:
- me.profilePhoto
summary: Get media content for the navigation property photo from users
operationId: Me_GetPhotoContent
responses:
'200':
description: Retrieved media content
content:
application/octet-stream:
schema:
type: string
format: binary
default:
$ref: '#/components/responses/error'
components:
responses:
error:
description: error
content:
application/json:
schema:
type: object
properties:
result:
type: stringWe should generate an extra parameter set with -AsBytes parameter. This parameterSet should return the response content as byte array instead of downloading the file.
Proposed Usage
# Feature request
$ContentInBytes = Get-PhotoContent -AsBytes
# Currently supported
Get-PhotoContent -OutFile "File_Path"