googleapis / googleapis/gapic-showcase
REST HTTP response headers have content-type=text/plain
- Dominant language
- Go
- Stars
- 183
- Forks
- 55
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 8
Description
`Content-Type` header should be `application/json` when JSON is returned, but Showcase always returns `text/plain`, which causes errors in some environments.
#### Steps to reproduce
Start the showcase server.
```
$ curl -v http://localhost:7469/
* Trying [::1]:7469...
* Connected to localhost (::1) port 7469
> GET / HTTP/1.1
> Host: localhost:7469
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Date: Thu, 18 Jan 2024 19:14:24 GMT
< Content-Length: 119
< Content-Type: text/plain; charset=utf-8
<
* Connection #0 to host localhost left intact
{"error":{"code":400,"message":"unrecognized request: GET \"/\"","details":null,"Body":"","Header":null,"Errors":null}}
```
Contributor guide
Assessment
This issue has not been assessed yet.