Skip to content

Commit

Permalink
Merge pull request #886 from microsoft/feature/multi-content-types
Browse files Browse the repository at this point in the history
feature/multi content types
  • Loading branch information
baywet authored Oct 12, 2023
2 parents aba545b + e44c31f commit 4f763f5
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/abstractions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-abstractions",
"version": "1.0.0-preview.27",
"version": "1.0.0-preview.28",
"description": "Core abstractions for kiota generated libraries in TypeScript and JavaScript",
"main": "dist/cjs/src/index.js",
"module": "dist/es/src/index.js",
Expand Down
14 changes: 12 additions & 2 deletions packages/abstractions/src/requestInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,19 @@ export class RequestInformation {
/**
* Sets the request body to be a binary stream.
* @param value the binary stream
* @param contentType the content type.
*/
public setStreamContent = (value: ArrayBuffer): void => {
this.tryAddRequestHeaders(RequestInformation.contentTypeHeader, RequestInformation.binaryContentType);
public setStreamContent = (
value: ArrayBuffer,
contentType?: string,
): void => {
if (!contentType) {
contentType = RequestInformation.binaryContentType;
}
this.tryAddRequestHeaders(
RequestInformation.contentTypeHeader,
contentType,
);
this.content = value;
};
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/authentication/azure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-authentication-azure",
"version": "1.0.0-preview.22",
"version": "1.0.0-preview.23",
"description": "Authentication provider for Kiota using Azure Identity",
"main": "dist/cjs/src/index.js",
"module": "dist/es/src/index.js",
Expand Down Expand Up @@ -30,7 +30,7 @@
"homepage": "https://github.com/microsoft/kiota-typescript#readme",
"dependencies": {
"@azure/core-auth": "^1.3.2",
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"@opentelemetry/api": "^1.2.0",
"tslib": "^2.3.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/authentication/spfx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-authentication-spfx",
"version": "1.0.0-preview.17",
"version": "1.0.0-preview.18",
"description": "Authentication provider for using Kiota in SPFx solutions",
"main": "dist/cjs/src/index.js",
"module": "dist/es/src/index.js",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"homepage": "https://github.com/microsoft/kiota-typescript#readme",
"dependencies": {
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"@microsoft/sp-http": "^1.15.2",
"@opentelemetry/api": "^1.2.0",
"tslib": "^2.3.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/http/fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-http-fetchlibrary",
"version": "1.0.0-preview.26",
"version": "1.0.0-preview.27",
"description": "Kiota request adapter implementation with fetch",
"keywords": [
"Kiota",
Expand Down Expand Up @@ -38,7 +38,7 @@
"test:cjs": "mocha 'dist/cjs/test/common/**/*.js' && mocha 'dist/cjs/test/node/**/*.js'"
},
"dependencies": {
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"@opentelemetry/api": "^1.2.0",
"guid-typescript": "^1.0.9",
"node-fetch": "^2.6.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/serialization/form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-serialization-form",
"version": "1.0.0-preview.16",
"version": "1.0.0-preview.17",
"description": "Implementation of Kiota Serialization interfaces for URI from encoded",
"main": "dist/cjs/src/index.js",
"browser": {
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"homepage": "https://github.com/microsoft/kiota-typescript#readme",
"dependencies": {
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"guid-typescript": "^1.0.9",
"tslib": "^2.3.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/serialization/json/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-serialization-json",
"version": "1.0.0-preview.27",
"version": "1.0.0-preview.28",
"description": "Implementation of Kiota Serialization interfaces for JSON",
"main": "dist/cjs/src/index.js",
"browser": {
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"homepage": "https://github.com/microsoft/kiota-typescript#readme",
"dependencies": {
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"guid-typescript": "^1.0.9",
"tslib": "^2.3.1"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/serialization/multipart/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-serialization-multipart",
"version": "1.0.0-preview.6",
"version": "1.0.0-preview.7",
"description": "Implementation of Kiota Serialization interfaces for multipart form data",
"main": "dist/cjs/src/index.js",
"module": "dist/es/src/index.js",
Expand Down Expand Up @@ -35,12 +35,12 @@
},
"homepage": "https://github.com/microsoft/kiota-typescript#readme",
"dependencies": {
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"guid-typescript": "^1.0.9",
"tslib": "^2.3.1"
},
"devDependencies": {
"@microsoft/kiota-serialization-json": "^1.0.0-preview.27"
"@microsoft/kiota-serialization-json": "^1.0.0-preview.28"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/serialization/text/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/kiota-serialization-text",
"version": "1.0.0-preview.24",
"version": "1.0.0-preview.25",
"description": "Implementation of Kiota Serialization interfaces for text",
"main": "dist/cjs/src/index.js",
"browser": {
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"homepage": "https://github.com/microsoft/kiota-typescript#readme",
"dependencies": {
"@microsoft/kiota-abstractions": "^1.0.0-preview.27",
"@microsoft/kiota-abstractions": "^1.0.0-preview.28",
"guid-typescript": "^1.0.9",
"tslib": "^2.3.1"
},
Expand Down

0 comments on commit 4f763f5

Please sign in to comment.