# Octet Stream Response Example

> See how to stream binary data (like file downloads) using g.res.contentType = OCTET_STREAM in API Maker.

Source: https://docs.apimaker.dev/v1/examples/res/contentType/OCTET_STREAM.html

### OCTET_STREAM

**Content type OCTET_STREAM**

```typescript
g.res.contentType = T.EContentType.OCTET_STREAM;
```

- It will download the image.

**base64**

```typescript
g.res.contentType = <any>'image/gif';
return `data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOwA=`
```

## Related

- [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html) · [Custom APIs](https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html)
