Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-14267

REST API documentation for 'Stream raw pull request diff' example incorrectly includes json Accept header

    XMLWordPrintable

Details

    Description

      Issue Summary

      In the current REST API documentation, there is an 'Accept: application/json' header specified in the example command for the 'Stream raw pull request diff' endpoint.

      When one adds this header, the request throws an HTTP 406 error return code. Omitting this header fixes the issue. This makes sense, as the provided diff is not in the JSON format - meaning that this header should be removed from the endpoint's provided example in this documentation.

      Steps to Reproduce

      Make a GET request to the endpoint /api/latest/projects/<projectKey>/repos/<repositorySlug>/pull-requests/<pullRequestId>.diff

      Expected Results

      Actual Results

      Workaround

      Remove the application/json header from the request being made to this API endpoint

      Attachments

        Activity

          People

            e74118b4e28d David Jansons
            eslaughter@atlassian.com Evan Slaughter
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: