question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REQ] Allow ability to get raw response as String from ApiResponse

See original GitHub issue

Is your feature request related to a problem? Please describe.

I have run into clients that return void for various reasons, but actually have a text response. This is when using the generated client library ‘jersey2’.

200
Content-disposition: attachment;filename=blah.csv 
Content-Length: 36
Content-Type: text/csv
blahblahblah

Describe the solution you’d like

I’d like for the ApiResponse<T> to have an additional field that would return the raw response as a String.

Describe alternatives you’ve considered

No alternative, short of updating annotations where api is defined to potentially get expected response.

Additional context

Currently using version 4.3.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
0x7162commented, Aug 29, 2022

I’m using the latest (6.0.1) from https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.0.1/ I assume it doesn’t make sense to create a ticket - I assume it is already fixed and it will be no factor in 6.0.2+ release.

_preload_content=False worked out, thanks! I assume we can close the ticket? @ericpetrowiakjelli please consider _preload_content solution provided by @spacether

0reactions
spacethercommented, Nov 4, 2022

The python client in v6.2.0 and onward requires python 3.7 and higher and the raw response is accessible as a property on every endpoint api response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fetch API get raw value from Response - Stack Overflow
Here's how you'd do what you want. In my case I wanted to manually parse the JSON because a certain character (\u001e) is...
Read more >
Using raw response in next request - Help - Postman community
Hi - I'm trying to use the current API response value, which is a raw number from 1 - 1000 in my subsequent...
Read more >
Web API Request/Response Data Formats - Media Types
Web API Request/Response Data Formats. Here, you will learn how Web API handles different formats of request and response data.
Read more >
Request and response objects - Django documentation
Django uses request and response objects to pass state through the system. When a page is requested, ... The raw HTTP request body...
Read more >
Inspect the JSON from the response payload
Activity: Make an API request on a web page. For this activity, you'll use JavaScript to display the API response on a web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found