MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - script not being picked up from REST api via curl

WebPagetest Forums

Full Version: script not being picked up from REST api via curl
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I'm trying to submit a script though curl, but it seems that it isn't being picked up. This is the syntax I use:

curl -X POST \
-F 'f=json' \
-F 'url=' \
-F 'k=mysupersecretkey' \
-F 'script=@script_file_name'

My script consist of just:

It works, but the only site visited is, the result is exactly like if I had no "script" instruction. If I point to a non-existing file I get an expected error from curl. If I put invalid command in the wpt script, I do not get any error and get the same behaviour as if I had no script at all...

What am I doing wrong here?

Also, why do we need a url if we have a script (trying to automate some test where I could change just the wpt script...).
This seemed to work for me when I tried it
This was with the `-F 'script=@script_file_name'` curl syntax?

It works for me if I put the content of a script after the equal sign, but not when I try to load a file with the at sign...
Yup just like this

curl -X POST \
-F 'f=json' \
-F 'url=' \
-F 'k=key' \
-F 'script=@wpt-script.txt'
Reference URL's