Skip to content

Port Invoke-WebRequest/RestMethod to PowerShell repo. - #1468

Merged
sergei (vors) merged 7 commits into
masterfrom
frangom/webcmdlets
Jul 25, 2016
Merged

sergei (vors) merged 7 commits into
masterfrom
frangom/webcmdlets

Conversation

@Francisco-Gamino

@Francisco-Gamino Francisco Gamino (Francisco-Gamino) commented Jul 21, 2016 •

Copy link
Copy Markdown
Contributor
  • Resolves issue #xyz.
  • Ported Invoke-RestMethod and Invoke-WebRequest to PowerShell repo, using CoreCLR refactoring guidance for CoreCLR, FullCLR, and common code. For CoreCLR, the code is written using the httpclient APIs.
  • Added new file structure for CoreCLR and FullCLR files for the webcmdlets source code.
  • Made Invoke-WebRequest cmdlet work on CoreCLR without mshtml.
  • Code is up-to-date with master.
    Yes
  • Add tests that fail without your changes.
    No tests are being added in this checkin. This is my next work item.
  • Update all relevant documentation.

@andyleejordan

Copy link
Copy Markdown
Member

Ah this is awesome! Perhaps we can add some really short Pester tests smoke test it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be useful to update the (non-building) csproj file as well.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's skip this for now and add it later (and probably just script the generation).

@lzybkr

Copy link
Copy Markdown
Contributor

Did you run the existing full tests yet?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Resources.cs should be removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@daxian-dbw

Copy link
Copy Markdown
Member

This Resources.cs should be removed from map.json file.

@daxian-dbw

Copy link
Copy Markdown
Member

We could exclude mshtml in CoreCLR build in a cleaner way. I chatted with Francisco offline, and he will update the change sets later.

@vors

Copy link
Copy Markdown
Collaborator

Can you add a super-basic mutli-platofort test in this PR?

@Francisco-Gamino

Copy link
Copy Markdown
Contributor Author

The Resources.cs has been removed.
Exclude mshtml in CoreCLR build dependency as Dongbo suggested.
Added 59 test for both Invoke-WebRequest and Invoke-RestMethod. Andy modified the test code to make sure it passes on Linux.

@andyleejordan Andy Jordan (andyleejordan) mentioned this pull request Jul 22, 2016
6 tasks done
@vors

sergei (vors) commented Jul 23, 2016 •

Copy link
Copy Markdown
Collaborator

I think these change would require updating .csproj files (that we use for VS support only).

I remember Jason Shirk (@lzybkr) said he would keep them up-to-date by hands if needed.

@vors

Copy link
Copy Markdown
Collaborator

Andy Jordan (@andschwa) I seen commit here that fixed the test. Where did it go?

@andyleejordan

Copy link
Copy Markdown
Member

sergei (@vors) Linux tests are fixed, OS X failed for a different reason. Commit was squashed. I'll take care of fixing OS X. It's another TTY issue.

These colors can be set now.
Again due to the fact that relying on Console.IsOutputRedirected (as
System.Console does for these APIs) causes bugs when pseudo-TTYs are
used (since the output is not redirected, but the APIs nonetheless can't
be used properly). So we ran into a problem where the value of CursorTop
and Console.BufferHeight were lies, and so we accidentally attempted to
set it numbers below zero. Guard everything.
@andyleejordan

Copy link
Copy Markdown
Member

LGTM. sergei (@vors) :shipit:?

@vors

Copy link
Copy Markdown
Collaborator

:shipit:

@vors
sergei (vors) merged commit 181d5de into master Jul 25, 2016
@vors
sergei (vors) deleted the frangom/webcmdlets branch July 25, 2016 05:05
@hiteshraigandhi Hitesh Raigandhi (hiteshraigandhi) changed the title Port Invoke-WebRequest/RestMethod to OPS Port Invoke-WebRequest/RestMethod to PowerShell repo. Aug 16, 2016
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants