Skip to content

Forward slashes in journal IDs return HTTP 400 errors in the JournalsAPI class #4

@metalogueur

Description

@metalogueur

When using any API calls requiring a journal ID, the API will return an HTTP 400 error if the journal's ID string contains a forward slash.

Example IDs :

  • CAN_J_LING/REV_CAN_L
  • HIST_SOC/SOC_HIST

Example calls :

  • api_response = api_instance.journals_id_get('CAN_J_LING/REV_CAN_L')
  • api_response = api_instance.journals_id_reports_year_year_get('CAN_J_LING/REV_CAN_L', 2022)

What has been tested on my side :

  • Calling the API with the ID string as is returns a *400 - Bad Request * response.
  • Calling the API with the ID as a raw string also returns a *400 - Bad Request * response.
  • URL encoding the forward flash when calling the API returns a 400 - Invalid syntax for the request title with There is an invalid char in the request details in the response.

Using a tool like Postman to call the API directly with these types of IDs works and returns the desired response with a 200 status. For example, calling the {{BASE_URL}}journals/INT_J_PRESS/POLIT/reports/year/2022 endpoint works even though there is an extra slash in the request.

Desired outcome :

The JournalsAPI should be able to handle journal IDs with forward slashes in order to return the requested data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions