Re: [問題] c#登入api

看板C_Sharp作者 (chec)時間7年前 (2016/10/19 16:54), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《MOONY135 (談無慾)》之銘言: : 大家好 最近剛要學call web api : 以下是我的疑問 : post使用的是64base Encode 送出 : 回傳的值是json : https://gist.github.com/Aix-Shiao/bf7df4258cfb935fca06bafde3c14551 : 以上是我的code : string postData = "myjson"; : myjson 是我將 : {"account":"ooo@xxx.com.tw", : "password":"pass1234"} : 這串json 丟入 : https://www.base64encode.org/ 這個網址產生出來的 : ======================= : 我想問說 : sting postDate -> : byte[] postDataBytes -> : Convert.ToBase64String(postDataBytes)-> : Convert.FromBase64String(returnValue); : 不知道這樣的轉換邏輯是否有問題? : 錯誤代碼一直是無post資料 感謝大大 目前也遇到同樣的問題... 不過我目前需要的是 post "account":"ooo@xxx.com.tw" 跟一個zip檔 應該是多重類型 不知道大大有沒有研究呢 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.124.46.66 ※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1476867296.A.723.html
文章代碼(AID): #1O1pJWSZ (C_Sharp)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #1O1pJWSZ (C_Sharp)