r-lib / httr

httr: a friendly http package for R
https://httr.r-lib.org
Other
988 stars 1.99k forks source link

POST request to Veev Vault Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [amgencdocs.veevavault.com] Connection timed out after 10001 milliseconds #666

Closed AmGeorgeB closed 1 year ago

AmGeorgeB commented 4 years ago

Relatively simple POST request to veeva vault is timing out after 10 seconds. Below is the cURL im trying to code up in R. The Query is Veeva Vault Query language.

curl --location --request POST 'https://amgencdocs.veevavault.com/api/v20.1/query' \
--header 'Authorization: session_Id' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'q=SELECT id FROM documents'
POST_SESSION <- POST("http://amgencdocs.veevavault.com/api/v20.1/query",
                     add_headers("Authorization" = session_Id, 
                                 "Content-Type" = "application/x-www-form-urlencoded"),
                     body = ("q = SELECT id FROM documents"))
content(POST_SESSION)

The error im getting is:

POST request to Veev Vault Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [amgencdocs.veevavault.com] Connection timed out after 10001 milliseconds

A post request to get the session_Id token works fine and so do various GET requests, so I'm not sure why this one is timing out, any help would be appreciated.

hadley commented 1 year ago

This is likely to be a problem specific to your API sorry, and apologies for taking so long to get back to you.