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
@samyuktha ramireddyWelcome to the community.
If this doesn't help, please share your API request (CURL or Code you are using to make request) for swift diagnosis and resolution.
i have added the curl command above. i have provided the accurate content-type header but still the response is 415 un supported media type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.