Open mrrsm opened 4 years ago
Is there any chance this could get merged? Without this, all calls to jenkinsapi.Node.set_config_element fail with an internal error, return code 500.
Tested with Jenkins 2.277.4 and jenkinsapi 0.3.11.
Actually, when I use the basic api of jenkins( POST /computer/test4/config.xml) to update my node config or job config ,it alerts me to add Host and Content-Length in the request headers .My jenkins verison is 2.361.4,and jenkinsapi is 0.3.13.So I think it may be a long time for users to have truble on updating their config by Jenkinsapi.
I have used Requests to avoid this defect, the program segment is wrote as follows: `python old_config = """<?xml version="1.1" encoding="UTF-8"?>
Can someone look into this ? I tried to run upload_config
with the same data received from get_config()
, and it fails.
But this code calling post_xml_and_confirm_status
works like a charm
Jenkins is throwing an error when the content type is not xml when uploading a node config.