File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
ads/model/deployment/common Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,11 @@ def send_request(
119119 Returns:
120120 A JSON representive of a requests.Response object.
121121 """
122-
123122 if is_json_payload :
124- header ["Content-Type" ] = header .pop ("content_type" , DEFAULT_CONTENT_TYPE_JSON )
123+ header ["Content-Type" ] = header .pop ("content_type" , DEFAULT_CONTENT_TYPE_JSON ) or DEFAULT_CONTENT_TYPE_JSON
125124 request_kwargs = {"json" : data }
126125 else :
127- header ["Content-Type" ] = header .pop ("content_type" , DEFAULT_CONTENT_TYPE_BYTES )
126+ header ["Content-Type" ] = header .pop ("content_type" , DEFAULT_CONTENT_TYPE_BYTES ) or DEFAULT_CONTENT_TYPE_BYTES
128127 request_kwargs = {"data" : data } # should pass bytes when using data
129128
130129 request_kwargs ["headers" ] = header
You can’t perform that action at this time.
0 commit comments