Skip to content

Commit

Permalink
add configuration useRelativeURLs
Browse files Browse the repository at this point in the history
  • Loading branch information
melgish committed Jun 7, 2020
1 parent 51cc879 commit ca97ae8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Basic configuration is based on [RequestInit](https://developer.mozilla.org/en-U
"Content-Type": "multipart/mixed",
}),
useChangset: false,
useRelativeURLs: false,
},
credentials: "omit",
fragment: "value",
Expand Down
4 changes: 4 additions & 0 deletions src/OdataConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export interface OdataBatchConfig {
boundaryPrefix?: string;
useChangset: boolean;
changsetBoundaryPrefix?: string;
/**
* When truthy, relative URL's will be used in batch elements
*/
useRelativeURLs: boolean;
}

export type OdataConfig = RequestInit & {
Expand Down
1 change: 1 addition & 0 deletions src/__snapshots__/o.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Object {
},
},
"useChangset": false,
"useRelativeURLs": false,
},
"credentials": "omit",
"fragment": "value",
Expand Down
3 changes: 2 additions & 1 deletion src/o.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function o(rootUrl: string | URL, config: OdataConfig | any = {}) {
headers: new Headers({
"Content-Type": "multipart/mixed"
}),
useChangset: false
useChangset: false,
useRelativeURLs: false
},
credentials: "omit",
fragment: "value",
Expand Down

0 comments on commit ca97ae8

Please sign in to comment.