AnWeber / vscode-httpyac

Quickly and easily send REST, Soap, GraphQL, GRPC, MQTT and WebSocket requests directly within Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac
MIT License
237 stars 20 forks source link

Request is not loaded from file (after updating to 5.10.0 version) #166

Closed woolfas closed 1 year ago

woolfas commented 1 year ago

Steps to reproduce:

  1. Install Visual Studio Code
  2. Install "httpYac - Rest Client v5.10.0" extension
  3. Create request.json file and put any valid json object inside
  4. Create http script file:
    
    POST https://httpbin.org/anything
    Content-Type: application/json

<@ ./request.json


5. Execute "httpyac: Generate Code" command

Expected results: request body from request.json is generated
Actual result: Empty body is generated
AnWeber commented 1 year ago

All request body imports were now accidentally always imported as buffers. However, code generation was only performed for string. I have now adjusted it so that the body is imported as text again, but also so that all bodies that are not PDF or images are included in the code generation. Update to v5.10.2