Comments (6)
Yes, the 1st one is the correct way.
The 2nd: it is a bug, we have set the 'Content-Type' to 'application/json' in the code, but it is not working. I will fix it.
The 3rd: we have to keep it as it is, the mesh APIs return JSON and the Easegress APIs return YAML by default, and this is an Easegress one.
The 4th: as the status code is not 2XX and the body is empty, all APIs haven't set the content type, can we just ignore it?
from easemesh.
About 4th, I agree @pengjiejason , we need to uniform content-type settings.
from easemesh.
I think we need to clarify our API contract:
- API for the EaseMesh should set
Content-Type: application/json
no matter the status code is 2XX or others. - API for the Easegress should set
Content-Type: text/vnd.yaml
no matter the status code is 2XX or others.
- Path start with
/apis/v1/mesh
is an API for the EaseMesh.- Path start with
/apis/v1/objects
is an API for the Easegress.
from easemesh.
For non-2XX responses, theoretically, it is possible that the request hasn't been processed by our code, so I think the client should not be so strict on them.
from easemesh.
Yes, the request hasn't been processed the Content-type
can be undefined, but if the request has been processed, sever should return Content-Type
in a consistent way (it's doesn't matter with the client, it's the server's behavior, the server's behavior should be consistency).
from easemesh.
the 2nd issue has been fixed in PR easegress-io/easegress#430.
the 4th is a little complex and needs more time to fix.
from easemesh.
Related Issues (20)
- Deprecated MeshDeployment HOT 1
- ShadowService Topology graph
- Dynamically configure sidecar inject parameters
- should support KUBECONFIG environment variable when install easemesh HOT 1
- what's the different between sidecar and javaAgent? HOT 1
- Golang monkey patching library utilized against terms of license HOT 2
- Support mutable config for all kinds of shadowed services HOT 1
- Cannot change the image names easeagent-initializer and imagePullPolicy in initContainers HOT 1
- 建议megaease官方出一个使用自己系列产品开发的一个云原生demo web应用。 HOT 1
- A Chinese version for README HOT 3
- Support sidecar injection for Pod, DaemonSet, StatefulSet, etc
- Easily mock a service HOT 1
- Support query service instance registered in the registry via emctl
- Install will meet resource invalid problem when there are existed resources HOT 1
- The api certificates.k8s.io/v1beta1 is deprecated in v1.19+, unavailable in v1.22+
- Missing license statement in some source files HOT 2
- Supporting mTLS in EaseMesh HOT 5
- [bug] Caching in sidecar worker won't be updated HOT 1
- Support traffic access control 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 easemesh.