例如,如果我打電話給:https://api.linkedin.com/v1/people/~:(id,first-name,last-name)它應該可以正常工作,但是如果 URL 編碼(并且應該是)像這樣:https://api.linkedin.com/v1/people/~:%28id,first-name,last-name%29我收到此錯誤消息:<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error> <status>404</status> <timestamp>1423577265744</timestamp> <request-id>6B2UQSA25W</request-id> <error-code>0</error-code> <message>[invalid.property.name]. Couldn't find property with name {:%28id,first-name,last-name%29} in resource of type {Person}</message></error>你怎么處理?目前我無法更改代碼,因為我的語言(Golang btw)使用標準包對它進行了非常正確的編碼。這是我的代碼:r, _ := http.NewRequest("GET", "https://api.linkedin.com/v1/people/~:(id,first-name,last-name)", nil)r.Header.Set("Authorization", "Bearer "+respBody.AccessToken)resp, err = http.DefaultClient.Do(r)除了重寫 std lib 代碼之外,您是否有解決此問題的方法?一些自 2013 年以來面臨同樣問題的人在這里https://developer.linkedin.com/forum/edit-i-dont-way-uris-look
- 1 回答
- 0 關注
- 167 瀏覽
添加回答
舉報
0/150
提交
取消