Commit ed4d3258 authored by Benito van der Zander's avatar Benito van der Zander

print warning when --post/--method are put at the wrong place (github close #8)

parent dba4273e
......@@ -3739,6 +3739,13 @@ begin
ExitCode:=1;
end;
end;
if (length(baseContext.dataSources) > 0) and (baseContext.dataSources[high(baseContext.dataSources)] is TFollowToWrapper) then
with baseContext.dataSources[high(baseContext.dataSources)] as TFollowToWrapper do
if followTo is THTTPRequest then begin
if (THTTPRequest(followTo).data = '') and (mycmdline.readString('post') <> '') then writeln(stderr, '--post must be placed before urls.')
else if (THTTPRequest(followTo).method = 'GET') and (mycmdline.readString('method') <> '') and (mycmdline.readString('method') <> 'GET') then writeln(stderr, '--method must be placed before urls.');
end;
end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment