Trying to use post method to create a file in bitbucket using bitbucket api and getting 415 unsupported media.
please find the curl command
Curl command: curl -X POST \
https://bitbucket-fof.appl.******/rest/api/1.0/projects/DCP/repos/policies \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Basic ********' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 169' \
-H 'Content-Type: multipart/form-data; boundary=--------------------------919644441165932680909311' \
-H 'Host: bitbucket-fof.appl.******' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F file=/nss/1.txt
Response:
415Unsupported Media Type