summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_writeout.c9
-rw-r--r--src/tool_writeout.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/tool_writeout.c b/src/tool_writeout.c
index d8ccbcbda..41441ff30 100644
--- a/src/tool_writeout.c
+++ b/src/tool_writeout.c
@@ -32,6 +32,8 @@
static const struct writeoutvar variables[] = {
{"url_effective", VAR_EFFECTIVE_URL, 0,
CURLINFO_EFFECTIVE_URL, JSON_STRING},
+ {"method", VAR_EFFECTIVE_METHOD, 0,
+ CURLINFO_EFFECTIVE_METHOD, JSON_STRING},
{"http_code", VAR_HTTP_CODE, 0,
CURLINFO_RESPONSE_CODE, JSON_LONG},
{"response_code", VAR_HTTP_CODE, 0,
@@ -142,6 +144,13 @@ void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo)
&& stringp)
fputs(stringp, stream);
break;
+ case VAR_EFFECTIVE_METHOD:
+ if((CURLE_OK == curl_easy_getinfo(curl,
+ CURLINFO_EFFECTIVE_METHOD,
+ &stringp))
+ && stringp)
+ fputs(stringp, stream);
+ break;
case VAR_HTTP_CODE:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo))
diff --git a/src/tool_writeout.h b/src/tool_writeout.h
index a21787ab9..68bacb9d4 100644
--- a/src/tool_writeout.h
+++ b/src/tool_writeout.h
@@ -39,6 +39,7 @@ typedef enum {
VAR_HTTP_CODE_PROXY,
VAR_HEADER_SIZE,
VAR_REQUEST_SIZE,
+ VAR_EFFECTIVE_METHOD,
VAR_EFFECTIVE_URL,
VAR_CONTENT_TYPE,
VAR_NUM_CONNECTS,