Comments (5)
Hi @Nadalt15668,
you can specify global query params like "sap-language" when initializing the client. Let's assume you use the FetchClient:
const odataClient = new FetchClient(
{ params: {"sap-language": "de" }, // here you have the full requestConfig object to set query params & headers
{ useCsrfProtection: true, odataPath + "/" }, // in here goes the configuration for auto CSRF token handling
});
Seems I haven't documented the first part...
from odata2ts.
Awesome I could use that but is there any way of doing it per query and not globally using the client?
from odata2ts.
Sure, but this is documented π and called "request configuration": See OData Client Docs.
from odata2ts.
Oh I've looked through it so many times and couldn't find anything π« Thanks π
from odata2ts.
Yeah, I need to overhaul the docs... quite some work....
from odata2ts.
Related Issues (20)
- Issue with Handling Keyless Entities in Microsoft Dynamics OData V4 API HOT 9
- [Bug Report] Filltering with ranges HOT 2
- [Bug Report] TypeScript: `RangeError: Maximum call stack size exceeded` HOT 9
- Very slow generation on big schema HOT 3
- [Bug Report] Error while running the program: RangeError: Maximum call stack size exceeded HOT 5
- Handling Large APIs HOT 19
- Support for odata `any()` fluent filter with empty filter body HOT 2
- [Feature Request] Handle Batch requests HOT 1
- Same action names for different entities lead to renamed interface name HOT 3
- Error when sending payloads with OData type annotation HOT 2
- [Bug Report] Nested any/all HOT 1
- Generator crashes while reading metadata from IFS OData service definition HOT 2
- [Feature Request] Generate numeric enums HOT 1
- Full Support for Function Overloads
- Response Model Only Types
- Support AbortSignal in options for FetchClient HOT 1
- Luxon Edm.Date not working
- Adding the type modifier for type only imports
- ODataDomainEntitiesService.ts: getDefaultHeaders error (Expected 2-3 arguments, but got 4) HOT 2
- Typescript generation: support verbatimModuleSyntax type imports HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odata2ts.