Skip to content

Commit

Permalink
chore(clearly-defined): Use "raw" mode for getting harvest data
Browse files Browse the repository at this point in the history
While "streamed" should be an alias for "raw", the former seems to cause
"Bad Gateway" responses. Use "raw" instead which does not seem to have
these problems and is more speaking anyway, as it is used to get the raw
results of a harvest tool.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Nov 18, 2024
1 parent 5983dcb commit 2bca4d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ interface ClearlyDefinedService {
* sense for the provider), see
* https://api.clearlydefined.io/api-docs/#/harvest/get_harvest__type___provider___namespace___name___revision___tool___toolVersion_
*/
@GET("harvest/{coordinates}/{tool}/{toolVersion}?form=streamed")
@GET("harvest/{coordinates}/{tool}/{toolVersion}?form=raw")
suspend fun harvestToolData(
@Path("coordinates", encoded = true) coordinates: Coordinates,
@Path("tool") tool: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private fun stubHarvestToolResponse(server: WireMockServer, coordinates: Coordin
val urlPath = "/harvest/${toolUrl(coordinates, "scancode", SCANCODE_VERSION)}"
server.stubFor(
get(urlPathEqualTo(urlPath))
.withQueryParam("form", equalTo("streamed"))
.withQueryParam("form", equalTo("raw"))
.willReturn(
aResponse().withStatus(200)
.withBodyFile("$TEST_FILES_DIRECTORY/$RESPONSE_FILE")
Expand Down

0 comments on commit 2bca4d1

Please sign in to comment.