Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- URLSubmit["http://www.wolfram.com",
- HandlerFunctions -> <|"TaskFinished" -> Print|>]
- Failure["URLSubmitFailure",
- Association[
- "MessageTemplate" :> MessageName[URLSubmit, "invak"],
- "MessageParameters" -> {
- Association["TaskFinished" -> Print]
- }
- ]
- ]
- curl -XGET "http://elastic00.example.com:9200/test-index/_search" -H 'Content-Type: application/json' -d'
- {
- "query": {
- "match": {
- "_id": "AWDd8gqhdJ9xvhUtDICa"
- }
- }
- }'
- RunProcess[{"curl",
- "-XGET", "http://elastic00.example.com:9200/test-index/_search",
- "-H", "Content-Type: application/json",
- "-d", "{"query":{"match":{"_id":"AWDd8gqhdJ9xvhUtDICa"}}}"
- }, "StandardOutput"]
- req = HTTPRequest[
- URLBuild[<|
- "Scheme" -> "http",
- "Domain" -> "elastic00.example.com",
- "Port" -> 9200,
- "Path" -> {"test-index", "_search"}|>],
- <|
- "ContentType" -> "application/json",
- "Body" -> ExportString[{"query" -> {"match" -> {"_id" -> "AWDd8gqhdJ9xvhUtDICa"}}}, "JSON"]
- |>
- ]
- URLRead[req]
- Failure["InvalidLocation",
- Association[
- "MessageTemplate" -> "Specified request is invalid",
- "MessageParameters" -> Association[]]]
Add Comment
Please, Sign In to add comment