dpli36193 2018-06-28 19:41
浏览 87

如何使用Go lang http客户端向支持SSO的服务器提交http请求

I am working on a Go script that makes some API calls to a webserver. I use the net/http library. SSO can be enabled or disabled on this webserver. So my go script works well with a non-SSO webserver. It is able to hit the endpoints. But with SSO, I get a http response like this `

Note: Since your browser does not support JavaScript, you must press the Continue button once to proceed.

    <form action="https&#x3a;&#x2f;&#x2f;hostname&#x2f;idp&#x2f;SSO.saml2" method="post">
        <div>

            <input type="hidden" name="SAMLRequest" value="PD94bWwgdmVyc2lvbj......pBdXRoblJlcXVlc3Q+"/>

        </div>
        <noscript>
            <div>
                <input type="submit" value="Continue"/>
            </div>
        </noscript>
    </form>
        </body>

` Is there a way in Go lang, to execute the form action and handle all the redirection?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料