Giter Site home page Giter Site logo

Comments (5)

markekraus avatar markekraus commented on August 18, 2024

I would suggest holding off until 6.1 and then requiring the 6.1 version. 6.1 adds a much easier to swallow multi-part/formdata feature:

$From = @{
    file = Get-Item -Path $FileName
    token = $Token
    filename = Split-Path -Path $Path -Leaf 
    channels = $Channel -join ", "
    title = $Title
    'initial_comment' = $Comment
} 
Invoke-RestMethod  -Uri $Uri -Method Post -Form $Form

PowerShell/PowerShell#5972

I wanted that feature in 6.0.0, but we couldn't get the design nailed down before RC.

from psslack.

RamblingCookieMonster avatar RamblingCookieMonster commented on August 18, 2024

Good catch!

Up to you all. I'm good with waiting until that PR is in (6.1?) if it makes sense to you.

@devblackops - that work for you? If you need this for the summit, would working in a branch that has code that works in 6.0.0 work for you? It would be more work, but feel free to submit a temporary workaround (as long as it continues to work in windows powershell) that we can adjust in 6.1

Cheers!

from psslack.

devblackops avatar devblackops commented on August 18, 2024

My only issue with waiting for 6.1 is now PSSlack would have a hard dependency on 6.1 in your manifest. It requires 3+ right now and there isn't a way to specify different required versions between Windows PS and core PS. Most people on Windows are not using 6+ yet. If you require 6.1, then everyone else depending on PSSlack requires 6.1.

@RamblingCookieMonster I don't strictly need it for the summit. I'd like to demo PoshBot on macOS but can use Windows if needed. This issue and #57 are the only things I've found so far and #57 really just creates a warning for me.

from psslack.

markekraus avatar markekraus commented on August 18, 2024

Yea, if you need backwards compat, I can only seriously recommend the raw .NET APIs (HttpClient in particular). The new multipart/form-data in 6.0 is not backwards compat with 5.x-3.0 either.

from psslack.

RamblingCookieMonster avatar RamblingCookieMonster commented on August 18, 2024

Ahh good call! Yeah - if you can do the same code and cover both core and full, even better

Thanks!

from psslack.

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.