Tim Perry

Creator of HTTP Toolkit: powerful tools to debug, test & build with HTTP(S).

Passionate tech speaker, open-source contributor, and maintainer of Loglevel, Git‑Confirm and notes.

Certificate infrastructure is built on trust. If you trust the wrong thing, it all falls down. Unfortunately we do it all the time anyway.

Hey Jim YT Chen, have you tried http://httptoolkit.tech/view/ruby/ as an alternative to HttpLog? It covers a very similar use case (capturing & viewing sent Ruby HTTP), but it’s got a proper UI & tools and doesn’t require any of those code changes at all. Let me know what you think :-)

Debug all HTTP(S) sent by git, npm, apt-get, or anything else

The command line is powerful, but can be hard to understand, and extremely hard to debug. Ever run a command, see it fail with a cryptic error, and have no idea why?

Better tools can help you understand what’s really going on. They can let you see inside the command you’re running to understand how it’s communicating, see what data it’s working with, and debug it in depth.

Excitingly I’ve just shipped one-click terminal interception to do exactly this with HTTP Toolkit, for HTTP and HTTPS, to show you everything your CLI is sending and ...

HTTP View is a beautiful, free & open-source HTTP inspector. This is the first release of HTTP Toolkit, and lets you intercept HTTP or HTTPS traffic with one click, explore & examine that traffic up close, and discover exactly what your code (or anybody else’s) is sending.

Want to dive right in? Download it now.

HTTP Toolkit is a project that I’ve been working on for a while, to build an open-source suite of tools for HTTP development. The goal is to intercept & examine HTTP, edit it live, analyse flows of HTTP requests to audit performance and security, and rapidly prototype HTTP cl...

Modern easy IoT with JS, Docker & Resin.io at DEVit
Oooh, this is a neat use of async hooks: https://github.com/vicanso/async-local-storage. It's thread-local storage for JS. Store values i… https://twitter.com/i/web/status/1265599204765896707
Expose EventEmitter methods on gpio.promise

I just hit this problem in my own VPN implementation (open source, if anybody wants a working example).

In my case, this was because I was writing TCP packets back to the VPN interface that were larger than expected, because my code wasn't properly handling the max segment size.

This wasn't due to some general purpose buffer waiting to flush, so packets that were too large for the receiving application would fail with ENOBUFS forever.

Although I can't find it documented anywhere, I expect this is the cause in general: you'll hit an ENOBUFS if you try to write any packet to the VPN that's indiv...

Spent a bunch of this week rewriting the HTTP Toolkit Android VPN internals to go fully non-blocking, and thereby f… https://twitter.com/i/web/status/1263801261922701312
This is astonishing: https://www.youtube.com/watch?v=fZSFNUT6iY8 It's absolutely not perfect, but if this is anything close to represe… https://twitter.com/i/web/status/1263445216725553152
I hope people paid attention to the "draft" state of the Feature-Policy header, because it's now likely being renam… https://twitter.com/i/web/status/1261245177131393024
The perils of integrating with other tools: Firefox 76 was just released, and quietly removed a feature (… https://twitter.com/i/web/status/1258429789138026497
As of today, we in Spain can go outside to exercise solo, or stroll around nearby with people we live with. Confin… https://twitter.com/i/web/status/1256701387968327681

It depends on what exactly is happening in loadUsers, but it's likely that you've forgotten to a return statement there.

If you change loadUsers to return the promise for the user's it's loading, your code should start working nicely.

The main problem you have currently is that the type of FormErrors says that it has a key matching every key of V, and until the reduce finishes, that's not true.

You have a couple of options:

  • Pass generics to reduce to make the return type Partial<FormErrors<V>>, and cast to FormErrors at the end:

    export function getInitialErrors<V extends KeyValue> (data: V): FormErrors<V> { return Object.keys(data).reduce<Partial<FormErrors<V>>>((acc, key) => ( { ...acc, [key]: [] } ), {}) as FormErrors<V> } 

    You could simply a little by now dropping the f...

Can you see the full response you're receiving?

It's not certain, but it seems likely that CORS headers aren't being included because the request is actually returning some other kind of error, and that in that case the CORS headers aren't being included. I.e. the CORS issue is probably hiding a separate error from you.

I would take a look in the browsers network tab to try and see the full response when it's failing, as that response might have more info, or using an HTTP inspection tool like HTTP Toolkit (full disclosure: this tool is one I've been building myself).

You could also try making ...

Mobx is so great! Should be wider used imo. I've been working on UX fixes to automatically update related HTTP dat… https://twitter.com/i/web/status/1247519657835159554
This status code proposal left me thinking. How popular is serverless? Isn't the platform/hosted code split the sam… https://twitter.com/i/web/status/1243551577367089154
Oracle are proposing a new HTTP status code (555), so PaaS providers can differentiate between 'the platform hit an… https://twitter.com/i/web/status/1243137474098081799
I have a Sony DN1080: https://www.sony.com/electronics/av-receivers/str-dn1080. Good before, but it's amazing now we're both in the house. One tap… https://twitter.com/i/web/status/1243135343311966210
⚠️ Quarantine time 🦠 Spanish lockdown, nationwide. I'm now in my flat with my partner for the next 15 days (minimu… https://twitter.com/i/web/status/1239132770699542528
In today's "open source is magic" news, @spautz / http://github.com/spautz/ has been putting in a huge amount of amaz… https://twitter.com/i/web/status/1237778807601446913
I honestly could not be more excited about this! It's working unbelievably well so far, it's a dream. Public relea… https://twitter.com/i/web/status/1232701137402388484
Thanks for having me @PyBCN! Anybody who wants to dig into the magic for themselves, the code is here:… https://twitter.com/i/web/status/1230589696197222400
My @PyBCN talk slides are coming together delightfully ✨ https://t.co/suJbODsEUq
Barcelona people - I'm speaking at @PyBCN this week! Come learn how HTTP Toolkit injects into & intercepts all Pyt… https://twitter.com/i/web/status/1229709931571535872