本文整理了Java中com.mashape.unirest.http.Unirest.patch()
方法的一些代码示例,展示了Unirest.patch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Unirest.patch()
方法的具体详情如下:
包路径:com.mashape.unirest.http.Unirest
类名称:Unirest
方法名:patch
暂无
代码示例来源:origin: io.joshworks/snappy-core
public static HttpRequestWithBody patch(String url) {
return Unirest.patch(url);
}
代码示例来源:origin: io.joshworks/snappy
public static HttpRequestWithBody patch(String url) {
return Unirest.patch(ClientManager.lookup(url));
}
代码示例来源:origin: com.infotel.seleniumRobot/core
public JSONObject addTestStepsToTestCases(List<String> testSteps) throws UnirestException {
if (testSteps.isEmpty()) {
return new JSONObject();
}
MultipartBody request = Unirest.patch(url + TESTCASEINSESSION_API_URL + testCaseInSessionId + "/").field("testSteps", testSteps.get(0));
for (String tc: testSteps.subList(1, testSteps.size())) {
request = request.field("testSteps", tc);
}
return getJSonResponse(request);
}
代码示例来源:origin: net.dv8tion/JDA
public JSONArray patchA(String url, JSONObject body)
{
return toArray(addHeaders(Unirest.patch(url)).body(body.toString()));
}
代码示例来源:origin: net.dv8tion/JDA
public JSONArray patchA(String url, JSONArray body)
{
return toArray(addHeaders(Unirest.patch(url)).body(body.toString()));
}
代码示例来源:origin: net.dv8tion/JDA
public JSONObject patch(String url, JSONObject body)
{
return toObject(addHeaders(Unirest.patch(url)).body(body.toString()));
}
代码示例来源:origin: unipop-graph/unipop
private BaseRequest executePatch(String baseUrl, Object urlMap, Object bodyMap) {
return Unirest.patch(baseUrl + urlTemplate.execute(urlMap)).body(bodyTemplate.execute(bodyMap));
}
代码示例来源:origin: com.infotel.seleniumRobot/core
private void unreserveVariable(TestVariable variable) {
if (variable.isReservable() && variable.getId() != null) {
try {
getJSonResponse(Unirest.patch(String.format(url + EXISTING_VARIABLE_API_URL, variable.getId()))
.field("releaseDate", ""));
} catch (UnirestException e) {
logger.warn("variable could not be unreserved, server will do it automatically after reservation period: " + e.getMessage());
}
}
}
代码示例来源:origin: com.infotel.seleniumRobot/core
public void addLogsToTestCaseInSession(String logs) {
if (testCaseInSessionId == null) {
createTestCaseInSession();
}
try {
getJSonResponse(Unirest.patch(url + TESTCASEINSESSION_API_URL + testCaseInSessionId + "/").field("stacktrace", logs));
} catch (UnirestException e) {
throw new SeleniumRobotServerException("cannot add logs to test case", e);
}
}
public Integer getSessionId() {
代码示例来源:origin: CognitiveJ/cognitivej
private HttpRequest buildUnirest(WorkingContext workingContext) {
String url = String.format("%s%s", PROJECTOXFORD_AI, workingContext.getPathBuilt());
switch (workingContext.getHttpMethod()) {
case GET:
return Unirest.get(url);
case PUT:
return Unirest.put(url);
case DELETE:
return Unirest.delete(url);
case PATCH:
return Unirest.patch(url);
}
return Unirest.post(url);
}
代码示例来源:origin: Kong/Astronode-Broadcaster
break;
case PATCH:
response = Unirest.patch(url).fields(parameters).asJson();
break;
case DELETE:
代码示例来源:origin: discord-java/discord.jar
break;
case PATCH:
request = Unirest.patch(url);
break;
case POST:
代码示例来源:origin: com.infotel.seleniumRobot/core
JSONObject variableJson = getJSonResponse(Unirest.patch(String.format(url + EXISTING_VARIABLE_API_URL, variable.getId()))
.field("value", variable.getValue())
.field("reservable", variable.isReservable()));
内容来源于网络,如有侵权,请联系作者删除!