Comments (3)
Hi!
The W3C Protocols page states:
Now that both HTTP extensions and HTTP/1.1 are stable specifications (RFC2616 at that time), W3C has closed the HTTP Activity.
So I assume that RFC2616 takes preference over RFC1341.
RFC2616 states that default media type should be application/octet-stream
Any HTTP/1.1 message containing an entity-body SHOULD include a
Content-Type header field defining the media type of that body. If
and only if the media type is not given by a Content-Type field, the
recipient MAY attempt to guess the media type via inspection of its
content and/or the name extension(s) of the URI used to identify the
resource. If the media type remains unknown, the recipient SHOULD
treat it as type "application/octet-stream".
What do you think?
from swagger_codegen.
Also, aiohttp
client uses RFC2616 to set default content type if it is not specified so i think it's best to provide same behaviour between clients.
from swagger_codegen.
Sure, my only goal regarding this issue is to make tracebacks clearer than just KeyError
, the actual implementation of a safer alternative to content_type=response.headers["Content-Type"]
can be borrowed from either spec/library.
from swagger_codegen.
Related Issues (19)
- Warning at `blackify` step HOT 1
- Please update version of schemathesis
- no cli __main__.py HOT 7
- generating classes for no direct endpoint HOT 5
- no name 'BaseModel' in module pydantic HOT 2
- minor improvements
- request or response defines object inline instead of in separate schema ref - produces None class HOT 10
- Boolean in additionalProperties results in a stacktrace HOT 1
- Literal not in typing.py HOT 2
- another class None and schema names containing - produce invalid python HOT 9
- KeyError on a valid minimal schema that doesn't define "components" HOT 9
- self.make_request() causing an attribute error because it doesn't have the right response codes HOT 12
- further class None examples HOT 3
- full swagger json
- should we add codecov (or similar) integration ? HOT 1
- setup.py file for client packaging HOT 1
- Cannot run tests HOT 2
- Not found http://petstore.swagger.io:8080/api/v3/openapi.json 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 swagger_codegen.