Comments (2)
Good question. There's 3 main approaches I could see.
- panic with a specific message. Doesn't help me any really.
- return an error. This would be a breaking change on a public function, so no-go.
- return
nethttp.DefaultTransport
without mutatingForceAttemptHTTP2
andDisableCompression
.This is my preferred route. You would only hit this in cases where the conversion error happens today.
// GetDefaultTransport returns the default http transport used by the library
func GetDefaultTransport() nethttp.RoundTripper {
defaultTransport, ok := nethttp.DefaultTransport.(*nethttp.Transport)
if !ok {
return nethttp.DefaultTransport
}
defaultTransport = defaultTransport.Clone()
defaultTransport.ForceAttemptHTTP2 = true
defaultTransport.DisableCompression = false
return defaultTransport
}
I can open an PR if this seams alright to you.
from kiota-http-go.
Thanks for using kiota and for reporting this @steveruckdashel
If we changed that to a checked conversion instead, what would you expect to happen when it's false?
from kiota-http-go.
Related Issues (13)
- return error from throwFailedResponses for patch calls HOT 2
- Response Handler Set Up in Request Context is never Retrieved
- Is there some way to globally override default 100s timeout HOT 3
- Setting infinite context timeout HOT 2
- Redirect handler fails when getting drive items using Graph sdk HOT 4
- parameters names decoding handler also decodes values HOT 1
- Response headers are not added to returned error HOT 14
- Add support to provide default middleware options in kiota factory HOT 5
- map XXX error status code
- No HTTP status code information returned if response body is empty HOT 8
- Allow users to handle the raw response object without stopping processing of parseable
- ensure 3XX responses without location header do not throw HOT 8
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 kiota-http-go.