简体   繁体   English

发送帖子数据并获取状态码

[英]Send post data and get status code

I need to know how to send this as post data in C#. 我需要知道如何在C#中将其作为发布数据发送。

The following is in python, and I need to convert it to C# code and send it as a webrequests. 以下是python中的代码,我需要将其转换为C#代码并将其作为webrequests发送。

post = {'customer_fid': self.customer_fid, 'salt': self.salt, 'token': token, 'customer_facebooktoken': self.customer_facebooktoken}

request = self.session.post(self.baseurl + self.loginurl, data=post)

This should be done with either webrequests or httpclient. 这应该通过webrequests或httpclient完成。 But I don't know how to do it. 但是我不知道该怎么做。 Please help me. 请帮我。

Thanks in advance. 提前致谢。

Have a look on this or this 看看这个 或这个

or this 或这个

Hope this will help you. 希望这会帮助你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM