lib/pwn/plugins/defect_dojo.rb in pwn-0.4.945 vs lib/pwn/plugins/defect_dojo.rb in pwn-0.4.946
- old
+ new
@@ -60,11 +60,10 @@
params = opts[:params]
http_body = opts[:http_body]
content_type = 'application/json; charset=UTF-8'
- content_type = 'multipart/form-data' if http_body.key?(:multipart)
url = dd_obj[:url]
api_version = dd_obj[:api_version]
base_dd_api_uri = "#{url}/api/#{api_version}".to_s.scrub
@@ -94,9 +93,10 @@
open_timeout: request_timeout
)
when :post
if http_body.key?(:multipart)
+ content_type = 'multipart/form-data'
payload = http_body
else
payload = http_body.to_json
end