Calling POST on sf-api.com/sf/v3/Shares seems always redirected to GET

  • 1
  • Question
  • Updated 1 month ago
My code is in Python, using requests to make post `requests.post`. My request body is in json, content-type is 'application/json'

POST `http://company-name.sf-api.com/sf/v3/Shares`

{"ShareType": "Send", "Type": "Send", "Items": [{"Id": "file_id"}], "ExpirationDate": "9999-12-31", "RequireLogin": false, "RequireUserInfo": false, "MaxDownloads": -1}

And response data is always
{'odata.metadata': 'https://company-name.sf-api.com/sf/v3/$metadata#Shares',
 'odata.count': 13219, 'value': [...], 'url': ...}

Thanks!
Photo of Xuong Tran Trieu

Xuong Tran Trieu

  • 2 Posts
  • 0 Reply Likes

Posted 1 month ago

  • 1
Photo of Xuong Tran Trieu

Xuong Tran Trieu

  • 2 Posts
  • 0 Reply Likes
Oops, figured it out, because the scheme is `http` instead of `https`. FIXED

So dump me ><