我从一个无法正常工作的应用程序中提取了以下代码,并尝试调试该请求。
HttpGetWithEntity request = new HttpGetWithEntity();
request.setURI(new URI(baseURL));
JsonObject reqSaveObject = new JsonObject();
reqSaveObject.addProperty("goal", "request");
reqSaveObject.addProperty("user", user_string);
reqSaveObject.addProperty("key", key_string);
reqSaveObject.addProperty("project", project_type);
我正在尝试在调试器(Fiddler / Postman)中构建请求,但我不知道如何构造请求。
我了解到user_string,key_string和project_type是指string,我知道这些值。
任何信息都会有所帮助!
答案 0 :(得分:0)
好吧,这是一个带有请求正文的GET请求,在您的情况下为JSON格式。因此,在Postman中,您将以以下样式插入一些内容作为请求正文:
{
"goal": "request",
"property": "value",
"property2": "value2"
}