urlencode到底要怎样做?
FINAL_DRAGON 发布于2017-12 浏览:5501 回复:3
0
收藏

_submitForm() {
const headers: HttpHeaders = new HttpHeaders()
.set('Content-Type', 'application/x-www-form-urlencoded');
const params: HttpParams = new HttpParams()
.set('access_token', '24.6f28cb33f8ce81c21bd33dc38be63ae2.2592000.1516887129.282335-10544144')
.set('image', encodeURIComponent(this.imageBase64.slice(23).replace('[\\s*\t\n\r]', '')));
this.http.post(
'/webimage',
params,
{headers: headers}
).subscribe(
(val) => {
console.log('相似度为', val['words'], this.imageBase64, this.imageBase64.slice(23));
},
(error) => {
console.log('识别器暂时无法联通,请稍后再次尝试!');
}
);

收藏
点赞
0
个赞
共3条回复 最后由kk57693回复于2022-04
#4用户已被禁言回复于2017-12
#3 FINAL_DRAGON回复
typescript

这语言。第一次见人用。你可以试试不urlencode是否可以。如果不行。那应该和js的urlencode基本上是一样的吧。

1
#3FINAL_DRAGON回复于2017-12
#2 用户已被禁言回复
什么语言呀?

typescript

0
#2用户已被禁言回复于2017-12

什么语言呀?

1
TOP
切换版块