IllegalArgumentException:@Body parameters cannot be used with form or multi-part encoding

使用retrofit时报错IllegalArgumentException:@Body parameters cannot be used with form or multi-part encoding即Body参数不能与形式或多部分编码中使用

因为是才刚学习使用时,不知道@FormUrlEncoded不能跟@Headers一起使用,代码中其实也没有用到FormUrlEncoded,去掉就可以了,之后尝试,运行成功,这里在学习中,记录一下。

原文地址:https://www.cnblogs.com/Sharley/p/10387240.html

时间: 2024-08-01 10:19:30

IllegalArgumentException:@Body parameters cannot be used with form or multi-part encoding的相关文章

magento中的各种form标签

1. Text Field    $fieldset->addField('title', 'text', array(          'label'     => Mage::helper('form')->__('Title3'),          'class'     => 'required-entry',          'required'  => true,          'name'      => 'title',          'o

TPCx-BB源码分析

Copy from: 一篇文章看懂TPCx-BB(大数据基准测试工具)源码 TPCx-BB是大数据基准测试工具,它通过模拟零售商的30个应用场景,执行30个查询来衡量基于Hadoop的大数据系统的包括硬件和软件的性能.其中一些场景还用到了机器学习算法(聚类.线性回归等).为了更好地了解被测试的系统的性能,需要对TPCx-BB整个测试流程深入了解.本文详细分析了整个TPCx-BB测试工具的源码,希望能够对大家理解TPCx-BB有所帮助. 代码结构 主目录($BENCH_MARK_HOME)下有:

Retrofit源码解析

square公司开源了一系列的优秀库,比如Retrofit,OkHttp,Picasso等, 前面简单分析了Picasso的源码,这里来分析下Retrofit的使用: 一.gradle添加依赖 compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0' compile 'com.squareup.okio:okio:1.5.0' compile 'com.g

Retrofit 2 使用指南

概述 Retrofit 是 Squareup 公司开源的网络请求框架,它其实是对 OkHttp 的一层封装,使用面向接口的方式进行网络请求,利用动态生成的代理类封装了网络接口请求的底层,并且提供了对 RxJava 的支持.写这篇文章的时候,Retrofit 已经发布 2.3.0 了,本文就以此版本来介绍.GitHub 地址 基本用法 添加依赖: 1 2 3 compile 'com.squareup.retrofit2:retrofit:2.3.0' compile 'com.squareup.

Json在PHP与JS之间传输

1. JS-->PHP a). JS create Json 1 <script> 2 $(document).ready(function(){ 3 /*--JS create Json--*/ 4 var jsonObject={}; // In another way: jsonObject={'name':"Bruce",'age':25}; 5 jsonObject['name'] = "Bruce"; 6 jsonObject['age

Machine Learning - XII. Support Vector Machines (Week 7)

http://blog.csdn.net/pipisorry/article/details/44522881 机器学习Machine Learning - Andrew NG courses学习笔记 Support Vector Machines支持向量机 {SVM sometimes gives a cleaner and more powerful way of learning complex nonlinear functions} Optimization Objective优化目标

Junit4.x扩展:运行指定方法

相信很多道友搞开发的一般都会用到Junit单元测试工具,不知道大家有没有遇到一个这样的问题: 有的单元测试用例有很多@Test方法,甚至有的方法会执行很长时间,只能空等执行.而实际上我们只需要运行其中的某一些方法就可以了.然后有人会说不是有ingore注解么,可ingore需要为许多的方法添加,当测试方法达到一定数量级的时候,改起来会很烦躁,如果commit到代码服务器上甚至可能会影响别人工作.己所不欲... 之前有朋友跟我说过TestNG是支持指定执行哪些方法,本人没有亲自去实验,因为公司统一

YASM User Manual

This document is the user manual for the Yasm assembler. It is intended as both an introduction and a general-purpose reference for all Yasm users. 1.?Introduction Yasm is a BSD-licensed assembler that is designed from the ground up to allow for mult

ArcGIS API for JS的一般编码习惯

1.引用claro.css和esri.css <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css"> 2.页面布局 &