aristanetworks / cvprac

Other
46 stars 47 forks source link

Static Headers #65

Closed brokenpackets closed 6 years ago

brokenpackets commented 6 years ago

It looks like we're hard-coding 'application/json' in the content-type header. In most cases, this works fine, but there are a few where we need 'multipart/form-data' for file uploads. If we want these to work within CVPRAC, we need a way to bypass the defaults.

        # Save proper headers
        self.headers = {'Accept': 'application/json',
                        'Content-Type': 'application/json'}

Example: cvpbackuprestore/importBackup.do

brokenpackets commented 6 years ago

Closing as non-issue for now. The main use case was going to be for backup imports, but seems that's no longer a problem.