denoland / denoland/deploy_feedback

`Deno.createHttpClient` is a must have for a rotating proxy

Open
#494 3 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
79
Forks
5
PR merge metrics
No merged PRs in 30d

Description

### What problem are you trying to solve?

`Deno.createHttpClient` is a must have for having a rotating proxy. Rotating proxy is a necessity for doing requests against limited APIs.

```js
export function rotateProxy(): Deno.HttpClient {
const proxy = `http://${proxies[Math.floor(Math.random()*proxies.length)]}`;
const client = Deno.createHttpClient({
proxy: { url: proxy }
});
return client;
}
```

gives the error below:

```
TypeError: Deno.createHttpClient is not a function at rotateProxy.
```

### Describe the solution you'd like

https://deno.com/deploy/docs/runtime-api#future-support says:

> Customizable `fetch` options using `Deno.createHttpClient`

Please enable `Deno.createHttpClient` in Deno Deploy Runtime as soon as possible.

### Describe alternatives you've considered

https://deno.land/manual@v1.36.4/basics/modules/proxies environment variables `HTTP_PROXY` or `HTTPS_PROXY` do not satisfy a rotating proxy implementation.

### Documentation, Adoption, Migration Strategy

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.