문제

for manual testing I want to send multiply files to my local server.

At the moment I'm using the firefox extension Poster. But it is a hassle, if you like me have some hundreds files and have to select every single file and post.

I want to send each file post automatically, with let's say a break of 5 seconds.

Is there a tool for that?

Using Linux x64 (xubuntu)

도움이 되었습니까?

해결책

How about a simple command line like

for file in *.txt; do POST http://host.domain.com < "$file"; sleep 5; done

The POST utility comes from the Ubuntu package libwww-perl but of course there are dozens of similar command line utilities which offer POSTing of contents to a given URL (wget, curl, …).

다른 팁

Use curl:

curl -X POST --form "fileupload=@filename.txt" http://your_url.com

insert this code inside 5 sec loop.

Use "wget" utility and made script which will execute wget every 5 seconds with different file

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top