0
$\begingroup$

Using CouchDB, Windows 10, M11.3

This curl command works fine at the command line, curl -X PUT http://127.0.0.1:5984/dbName

and this works fine with

URLExecute@HTTPRequest["http://127.0.0.1:5984/dbName",<|"Method" -> "PUT"|>]

Both return {"ok" -> True}, as expected.

How do I make URLExecute@HTTPRequest... return verbose, like curl -vX PUT http://127.0.0.1:5984/dbName does at the command line?

$\endgroup$
  • $\begingroup$ RunProcess["curl -X PUT http://127.0.0.1:5984/dbName"] $\endgroup$ – user6014 Sep 17 '18 at 22:43
  • $\begingroup$ thx for the hint. This works: RunProcess[{"cmd", "/c", "curl -X PUT 127.0.0.1:5984/dbname"}] $\endgroup$ – Mitch Sep 17 '18 at 23:01
  • $\begingroup$ From Mac, anytime I need to make a request and can't figure out the proper Mathematica code, CURL is robust enough where I'm happy enough to just quickly call it directly. $\endgroup$ – user6014 Sep 17 '18 at 23:02
  • 1
    $\begingroup$ When I wan maximum "verbosity" I use Fiddler to see exactly what web request Mathematica is sending and receiving. BTW, I use CouchDB from Mathematica too. $\endgroup$ – Gustavo Delfino Sep 18 '18 at 3:12
  • $\begingroup$ Thx for the Fiddler suggestion. $\endgroup$ – Mitch Sep 18 '18 at 5:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.