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.

`ERR_INVALID_PROTOCOL` for http files in version 5.0.1

See original GitHub issue

HTTP File:

###
# @name PowerAppsBearerChallenge
@PowerAppsCommonApiEndpoint = https://api.powerapps.com
@PowerAppsApiVersionLatest = 2021-02-01
GET {{PowerAppsCommonApiEndpoint}}
  /providers/microsoft.PowerApps
  /environments
  ?api-version={{PowerAppsApiVersionLatest}}
Authorization: Bearer

When executing using node:

$ npx httpyac@5.0.1 test.http --all
Please use request.options[...] instead of request[...] for setting Got Options (protocol). Support will be removed
https://api.powerapps.com/providers/microsoft.PowerApps/environments?api-version=2021-02-01 {        
  protocol: 'HTTP',
  url: 'https://api.powerapps.com/providers/microsoft.PowerApps/environments?api-version=2021-02-01',
  method: 'GET',
  options: {
    http2: undefined,
    cookieJar: CookieJar {
      rejectPublicSuffixes: true,
      enableLooseMode: false,
      allowSpecialUseDomain: false,
      store: { idx: {} },
      prefixSecurity: 'silent',
      _cloneSync: [Function (anonymous)],
      _importCookiesSync: [Function (anonymous)],
      getCookiesSync: [Function (anonymous)],
      getCookieStringSync: [Function (anonymous)],
      getSetCookieStringsSync: [Function (anonymous)],
      removeAllCookiesSync: [Function (anonymous)],
      setCookieSync: [Function (anonymous)],
      serializeSync: [Function (anonymous)]
    }
  },
  headers: { Authorization: 'Bearer' },
  proxy: undefined
} RequestError: Protocol "HTTP" not supported. Expected "http:"
    at Request._makeRequest (C:\path\to\test_dir\node_modules\got\dist\source\core\index.js:1183:19)
    at new NodeError (node:internal/errors:371:5)
    at new ClientRequest (node:_http_client:158:11)
    at request (node:http:96:10)
    at Request._makeRequest (C:\path\to\test_dir\node_modules\got\dist\source\core\index.js:1130:43)
    at async C:\path\to\test_dir\node_modules\got\dist\source\core\index.js:334:17 {
  code: 'ERR_INVALID_PROTOCOL',
  timings: undefined
}
RequestError: Protocol "HTTP" not supported. Expected "http:"
    at Request._makeRequest (C:\path\to\test_dir\node_modules\got\dist\source\core\index.js:1183:19)
    at new NodeError (node:internal/errors:371:5)
    at new ClientRequest (node:_http_client:158:11)
    at request (node:http:96:10)
    at Request._makeRequest (C:\path\to\test_dir\node_modules\got\dist\source\core\index.js:1130:43)
    at async C:\path\to\test_dir\node_modules\got\dist\source\core\index.js:334:17 {
  code: 'ERR_INVALID_PROTOCOL',
  timings: undefined
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
AnWebercommented, Feb 28, 2022

Did a great job. I wanted to optimize for me only briefly the display for RabbitMQ and thereby immediately made the whole project broken. Thanks for the hint.

0reactions
fredrikhrcommented, Feb 28, 2022

I can confirm that everything now seems to work again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error in npm install && npm run dev when installing breeze
I did fight with that one day ago. I discoverd that if the error persist after of: rm -rf node_modules rm package.lock.json npm...
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