question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

responseEncoding is missing from typescript definitions

See original GitHub issue

Summary

the responseEncoding property of the axios config is missing from the AxiosRequestConfig typescript definitions.

Context

The property is documented in the README but not present in the typescript definitions.

  • axios version: v0.18.0
  • Environment: node v11.1.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
JavierPAYTEFcommented, May 20, 2021

This is still not resolved yet. The PR pointed in the last comment was closed without resolution also.

In case anyone else finds this issue, a workaround to at least be able to compile, is to create a .d.ts in your source and add the following code:

// eslint-disable-next-line @typescript-eslint/no-unused-vars
import AxiosRequestConfig from "axios";

declare module "axios" {
  export interface AxiosRequestConfig {
    responseEncoding?: string;
  }
}

Of course this is not the best “typing” but at least it works until the issue with the types is resolved.

4reactions
stefanplcommented, Dec 17, 2019

Still an issue with v 0.19.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

ts is missing from the TypeScript compilation. Please make ...
I was migrating from JS into TS simply by renaming a file extension. I was already using Webpack and list of output bundles...
Read more >
Azure AD B2C SAML Response encoding issue - Microsoft Q&A
Hi everyone,. If I create a user with a name which does have characters which need to be encoded correctly in the name...
Read more >
Content-Encoding - HTTP - MDN Web Docs
Content encoding is mainly used to compress the message data without losing information about the origin media type.
Read more >
OGC OpenSearch-EO GeoJSON(-LD) Response Encoding ...
The response encoding defined in the document satisfies the following design ... JSON Schema is a JSON media type for defining the structure...
Read more >
Request Config | Axios Docs
... for `responseType` of 'stream' or client-side requests responseEncoding: ... You can also define your proxy using the conventional `http_proxy` and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found