File tree Expand file tree Collapse file tree
rest-api/v1/curl/testproject Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /usr/ bin/sh
1+ #! /bin/bash
22# curl -i -X POST -u dev01:dev01 http://localhost/development/tlrepo/lib/api/rest/v1/testprojects
33# -i include headers
44# -X (HTTP) Specifies a custom request method to use when communicating with the HTTP server
1010# Posting data from a file named 'foobar' would thus be done with --data @foobar.
1111#
1212echo ' Testing TestLink REST API - POST /testprojects'
13- curl -i -H " Content-Type: application/json" -X POST --data " @../json/createTestProject.json" -u dev01:dev01 http://localhost/development/tlrepo/lib/api/rest/v1/testprojects
13+ TURL=" http://localhost/development/github/testlink-code" ;
14+ TURL=" $TURL /lib/api/rest/v2/testprojects"
15+ # AUTH="restapi-leader:dev01"
16+ AUTH=" restapi-admin:fruta"
17+
18+ curl -i -H " Content-Type: application/json" -X POST --data " @../json/createTestProject.json" -u $AUTH $TURL
You can’t perform that action at this time.
0 commit comments