dcloudio / dcloudio/uni-app

快应用下请求头的设置的bug

Open
#2,032 2 comments 0 reactions 0 assignees View on GitHub
quickapp 提供了复现方案
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

**问题描述**
调用`uni.request`这个api的时候,设置header的为`{'Content-Type': 'application/x-www-form-urlencoded'}`,实际请求后content-type为`application/json`,导致所有请求体在`requeset payload`里

![image](https://user-images.githubusercontent.com/8599535/90479935-0da23400-e162-11ea-88e1-08bdfd9bcd00.png)

结果:

![image](https://user-images.githubusercontent.com/8599535/90480181-79849c80-e162-11ea-8639-3e30f2440837.png)

**系统信息:**
所有安卓平台

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with uni.request on an Android quick app, using the Content-Type header shown in the report. Compare the actual request header and payload with the requested form-encoded content type; done means the supplied header is preserved and the request body is sent accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
api, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.