Tried the following curl command for uploading a local turtle file to GraphDB (free version), running at http://localhost:7200/.
curl -X POST 'http://localhost:7200/repositories/testrepository1/statements' -H "Content-Type:text/turtle" -T "/home/Desktop/onto.ttl"
Eventhough this curl command doesn't return any error when executed, the local file onto.ttl is not uploaded to testrepository1
Iam using graphDB free with version 9.7.0.
It'll be grateful if someone help me with this. Thanks in advance!
You are using a wrong mime type - it should be application/x-turtle instead of text/turtle. The request will look something like this:
curl -X POST -H "Content-Type:application/x-turtle" -T "/home/Desktop/onto.ttl" http://localhost:7200/repositories/testrepository1/statements
Related
I'm trying to download a private repository as .zip via cmd, I can do pull/push and create branches on this repository but i'm not sure if that makes me a collaborator, i was able to achieve this with a public repository like this curl -L -o master.zip http://github.com/zoul/Finch/zipball/master/
I also tried curl -u 'MyUsername' -L -o master.zip https://github.com/{repo owner}/{repo name}/zipball/master/ but all I got was a .zip and the message "The archive is either in unknown format or damaged", what am I missing?
I found what I was looking for. I generated a personal access token in Github with all the necessary permissions (initially I didn't give all the permissions I needed) and with the following structure I was able to download the zip from the master branch:
curl -H "Authorization: token MyToken" -L -o master.zip https://github.com/repoOwner/repoName/zipball/master/
With the github API, I got information about it:
curl -i -H "Authorization: token MyToken" https://api.github.com/repos/repoOwner/repoName
I'm trying to implement a gradle task that sends a HTTPS request to my backend. For authentication, I have to attach a client certificate to the request.
Does anybody know how to do this? I'm currently using the library http-builder-ng but haven't figured out yet to achieve this.
Well I dont know your library but is sh an option for you?
Gradle features an Exec task to execute shell as task.
You could do curl there:
curl -v \
--cacert ./ca.pem \
--key ./admin-key.pem \
--cert ./admin.pem \
https://xxxx/api/v1/
In build.gradle it could look like this:
(url is a gradle project property, can be given via -P flag during build or in gradle.properties.)
task httpsRequest(type:Exec) {
commandLine 'sh', '-c', "curl -v --cacert ./ca.pem --key ./admin-key.pem --cert ./admin.pem '${url}'"
}
I am trying to add Pass/Fail status in Saucelabs whenever I run an Automated test but I can't figure out how shall I do it. I use Behat - Selenium Driver. I read the documentation but it didn't help me.
I tried to use the Saucelabs Rest API guide and I launch in my console the following
curl -X PUTĀ \
-s -d '{"passed":true}' \
-u https://USERNAME:APIKEY#saucelabs.com/rest/v1/users/USERNAME
But it doesn't work.
I think you need the session Id
ownCloud uses:
curl -X PUT -s -d "{\"passed\": $PASSED}" -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY https://saucelabs.com/rest/v1/$SAUCE_USERNAME/jobs/$SAUCELABS_SESSIONID
see: https://github.com/owncloud/core/blob/master/tests/travis/start_ui_tests.sh#L235
and this Id is pulled from the URL: https://github.com/owncloud/core/blob/master/tests/ui/features/bootstrap/FeatureContext.php#L171
but there might be better ways of getting it
I want to upload my APK to Saucelabs, How can I do that?
Is there any tab do so ?
I am trying with Curl command as well, which is not working for me
Yes, U have to use curl command correctly.
Use below Link to download curl :
http://curl.haxx.se/download.html
After that use below curl command :
curl -u YOUR_SAUCE_USERNAME:YOUR_SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/YOUR_SAUCE_USERNAME/YOUR_ANDROID_APP.apk
I have tried to get source maps working with react native and sentry but I keep getting this type of output with no meaningful line numbers:
i#file:///var/containers/Bundle/Application/G4535-H056800I/AppName.app/main.jsbundle:
[Filtered]#file:///var/containers/Bundle/Application/G4535-H056800I/AppName.app/main.jsbundle:
[Filtered]#file:///var/containers/Bundle/Application/G4535-H056800I/AppName.app/main.jsbundle:59:1255
[native code]
I did the following to create and upload the source maps for my release:
1. Create map/bundle artifacts
curl http://127.0.0.1:8081/index.ios.map -o index.ios.map
curl http://127.0.0.1:8081/index.ios.bundle -o index.ios.bundle
2. Edit last link in index.ios.bundle to point to map
WAS: `//# sourceMappingURL=/index.ios.map`
NOW: `//# sourceMappingURL=index.ios.map`
3. Create Release on Sentry
curl https://app.getsentry.com/api/0/projects/appname/releases/ -u "username": -X POST -d '{"version": "version_num"}' -H 'Content-Type: application/json'
4. POST artifacts to Sentry release
curl https://app.getsentry.com/api/0/projects/appname/releases/version_num/files/ -u "username": -X POST -F file=#index.ios.bundle
curl https://app.getsentry.com/api/0/projects/appname/releases/version_num/files/ -u "username": -X POST -F file=#index.ios.map
Have I missed something? Been playing around with this for some time and can't get it to work. Any help would be much appreciated! Thanks