Giter Site home page Giter Site logo

Comments (4)

AnWeber avatar AnWeber commented on May 21, 2024

Thank you for reporting. Do you get an error message. This would appear in the output in the httpyac - Log tab. Would be great. Otherwise I will try it out myself.

from vscode-httpyac.

stephsix avatar stephsix commented on May 21, 2024

In my case, there is not any error message appear in the httpyacc - Log tab.
I forked your great job and tried it locally with my Macbook Air, finding that there may be something wrong with the method "generateCodeRequest" in (src/provider/harCommandsController.ts):
image
It never hit my breakpoint on the callback of context.httpClient during "Generate Code".
FYI, here is my testing code:

// gen_code_not_work.http
{{
    exports.date = "2021-09-10"
}}

GET https://httpbin.org/json HTTP/1.1
Date: {{date}}

from vscode-httpyac.

AnWeber avatar AnWeber commented on May 21, 2024

This is exactly the right method. Probably the error is in httpyac, which does not use the httpClient correctly.
If you want to continue looking there, here's what you'd have to do.

  1. git clone, npm install and npm link in httpyac folder
  2. npm link httpyac in vscode-httpyac folder
  3. modifypackage.json of httpyac (remove "types" and change "main" from dist to src)
{
  "main": "./src/index.ts",
  "types2": "./dist/index.d.ts",
  1. modify tsconfig.json in vscode-httpyac (add httpyac to rootDir)
{
  "compilerOptions": {
     "rootDirs": ["src", "./node_modules/httpyac/src"],
  }
}
  1. npm run watch in vscode-httpyac

After these changes, when vscode-httpyac debug session is started, the httpyac source can also be debugged.

You don't necessarily have to find the bug. I'll be happy to take a look at it though, I'd just check out the support for GRPC before I do that.

from vscode-httpyac.

AnWeber avatar AnWeber commented on May 21, 2024

The cause was that the httpClient was overwritten in the api. I took the opportunity and rewrote the logic to use logResponse interface. With version 3.2.0 the call should work correctly again

from vscode-httpyac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.