I just ran into this problem on Windows 10 today. In my case, the request was executed correctly, but the curl command by default displayed time information that discarded the validation logic in the send script.
Sending was successful, but if I printed the response line, it looked something like this:
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 1562 100 548 100 1014 548 1014 0:00:01 --:--:-- 0:00:01 2082 100 1562 100 548 100 1014 548 1014 0:00:01 --:--:-- 0:00:01 2082 {"id":"Blablablabla","courseId":"Blablabla","itemId":"Blabla",...}
I noticed that the curl command was used to execute the request, so I added the --silent flag to the code that creates the curl command to execute in submitWithConfiguration.m (in my case, line 134).
% use urlread or curl to send submit results to the grader and get a response function response = getResponse(url, body) % try using urlread() and a secure connection params = {'jsonBody', body}; [response, success] = urlread(url, 'post', params); if (success == 0) % urlread didn't work, try curl & the peer certificate patch if ispc % testing note: use 'jsonBody =' for a test case json_command = sprintf('echo jsonBody=%s | curl --silent -k -X POST -d @- %s', body, url); % ^^^^^^^^ this right here!! else % it linux/OS X, so use the other form json_command = sprintf('echo ''jsonBody=%s'' | curl --silent -k -X POST -d @- %s', body, url); end % get the response body for the peer certificate patch method [code, response] = system(json_command); % test the success code if (code ~= 0) fprintf('[error] submission with curl() was not successful\n'); end end end
Now the answer looked more reasonable:
{"id":"Blablablabla","courseId":"Blablabla","itemId":"Blabla",...}
And the sending is completed successfully.