Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default requests to cosmos to version 2, with a version 1 fallback #658

Merged
merged 1 commit into from
Jun 30, 2016

Conversation

tamarrow-zz
Copy link
Contributor

@tamarrow-zz tamarrow-zz commented Jun 18, 2016

:returns: header information
:rtype: str
"""

return ("application/vnd.dcos.package.{}+json;"
"charset=utf-8;version=v1").format(request_type)
"charset=utf-8;version={}").format(request_type, version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should instead construct all of the possible content type ahead of time. For example most RPCs in Cosmos are going to stay as v1. The type of this my could be: Map[String, List[String], the key is the request_type and the value is a list of supported content-type in preference order. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, updated!

@tamarrow-zz
Copy link
Contributor Author

@jsancio can you review please? I removed your commit so that tests will pass (once testing/master is updated to 1.8 we can merge your pr)

@tamarrow-zz tamarrow-zz force-pushed the cosmos-v2 branch 4 times, most recently from 453a6ac to efdf6a0 Compare June 30, 2016 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants