1Migrated from folder: common/fetchJSON
11_None of this information is useful. The reason-phrase is barely supported on the web and was always an oddity, but keep reading if you like oddities!_
12
13If you're used to JavaScript’s `fetch()` method to make HTTP requests, you've seen the `reason-phrase` under a different name: `statusText`:
14
15```ts
16(await fetch('https://example.com/')).statusText
17```
18
48```
49
50Unfortunately, this doesn't work! The response that Val Town produces is reorganized and optimized by Cloudflare, which upgrades requests and responses from HTTP 1.1 to HTTP 2. And sadly, HTTP 2 [dropped support for the custom reason-phrase](https://fetch.spec.whatwg.org/#concept-response-status-message).
51
52_RIP the `reason-phrase`._ It was present even in a [1992 draft of the HTTP specification](https://www.w3.org/Protocols/HTTP/Response.html), and was a weird and under-appreciated way to pilfer extra information in a response. Now, thanks to HTTP/2 and the commonplace use of proxies and CDNs like Cloudflare, it's no longer usable. It was fun while it lasted.
1# GET /v1/me/comments
2Fetches information about any comments on vals.
3
4Requires a secret called valtownToken, set to your API Token. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.
1# GET /v1/me/likes
2Fetches information about any val you "like".
3
4Requires a secret called valtownToken, set to your API Token. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.
1# DuckDB
2
3[DuckDB](https://duckdb.org/) works on Val Town, with only one small tweak! We're basically using DuckDB in the same way you'd use it with a browser - using the WASM package with its dependencies fetched from [jsdelivr](https://www.jsdelivr.com/).
4
5The only trick is to create the worker ourselves rather than using `duckdb.createWorker`. DuckDB's built-in createWorker method doesn't specify a worker type, which causes `type` to default to `classic`, and Deno (our runtime) doesn't support classic workers.
1Fetches the PGN for a [Lichess](https://lichess.org) game.
2
3Migrated from folder: lichess/lichessPgn
1# GET /v1/me/runs
2
3Fetches information about runs of any val you author.
4
5Requires a secret called valtownToken, set to your API Token. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.
1# GET `/v1/me`
2Fetches information about yourself.
3
4Requires a secret called `valtownToken`, set to your API Token. See more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token.
1Migrated from folder: webpush/handleFetchTextResponse
1I wanted to see if val.town forwards my client IP Address using the x-forwarded-for header, which it does, but cloudflare provides the True-Client-IP header as well. When you run a val on the website, it is actually running from val's servers so it won't come from your client IP. You'll need to copy the express fetch and run that from your client.
2
3Migrated from folder: helpers/whatIsMyIp