New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SafeBrowsing v5 only supports alt=proto #2534
Comments
APIs that publish clients to this repo should be sending JSON responses. If the SafeBrowsing v5 API is sending protobuf responses, that is incorrect. Can you provide a full dump of the response? |
That JSON was the full dump of the response. I can capture the HTTP headers later. |
Here is the discovery document for this API: https://safebrowsing.googleapis.com/$discovery/rest?version=v5 We will investigate further. |
I believe the discovery document for this API (linked above) states that JSON is supported and is the default: "alt": {
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"default": "json",
"type": "string",
"enum": [
"json",
"media",
"proto"
],
"location": "query",
"description": "Data format for response."
}, Therefore it appears that the service does not honor the contract of the discovery document. @lionello Can you search the Cloud SQL issue tracker for an existing issue, and if not found, create a new issue demonstrating how the service does not support |
Closing. As stated above this issue should be reported to the API service team. |
This should be
"default": "proto"
:google-api-go-client/safebrowsing/v5/safebrowsing-api.json
Line 40 in 9622a0d
The currently generated SDK will always fail with HTTP 400, response:
Setting alt to
"proto"
doesn't work, since the SDK always decodes the response as JSON, failing withinvalid character '\x12' looking for beginning of value
trying to decode the protobuf as JSON.The text was updated successfully, but these errors were encountered: