Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/multi content types #886

Merged
merged 2 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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