-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated httpMethods.sc #8
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,35 @@ object Test { | |
).get, | ||
keyChain = List(cosyKey,localKey) | ||
) | ||
|
||
//---------------------------------------------------------------------------------------------- | ||
|
||
def deleteLocalKey = http.run( | ||
req = DELETE[`text/turtle`]( | ||
resource = Uri("https://localhost:8443/2013/") | ||
) | ||
) | ||
|
||
def getLocalKey = http.run( | ||
req = GETpg( | ||
uri = Uri("https://localhost:8443/2013/"), | ||
keyChain = List(localKey) | ||
) | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why would the key be the URL of the container? Have you tried out these functions to see what they return? |
||
|
||
def putLocalKey = http.run( | ||
req = PUT[`text/turtle`]( | ||
resource = Uri("https://localhost:8443/2013/"), | ||
graph = pubKeyPG.get.graph | ||
).get, | ||
keyChain = List(localKey) | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here you are trying to PUT a resource on the container. POST creates a new resource. But PUT overwrites the one given by the URL. Do you actually want to overwrite the container? |
||
|
||
def patchLocal(sparqlUpdateCommand: String) = http.run( | ||
req = PATCHsparql[`text/turtle`]( | ||
resource = Uri("https://localhost:8443/2013/"), | ||
sparqlUpdate = sparqlUpdateCommand | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, if you read the curl specs you'll see that there is sparql update on the rww-repo that you can use to get going. |
||
) | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you want to delete the whole root container? Would it not be better to delete a file that was previously created perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unlikely to work it seems to me without a proper credentials.