Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send PUT request without multipart/form-data? #464

Closed
kamoljan opened this issue Feb 28, 2014 · 7 comments
Closed

How to send PUT request without multipart/form-data? #464

kamoljan opened this issue Feb 28, 2014 · 7 comments
Assignees
Milestone

Comments

@kamoljan
Copy link

My server side doesn't support multipart for PUT yet...
How to disable multipart/form-data in PUT request?

@leonardoxh
Copy link

Remember this is a header...
multipart/form-data

I think if you not pass a file to RequestParams the multipart/form-data will not be set...

@kamoljan
Copy link
Author

You are right. Currently I am sending it like this:

    RequestParams params = new RequestParams();
    params.put("picture[image]", new ByteArrayInputStream(data));

    GoRestClient.put(":9090", params, new JsonHttpResponseHandler() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
        ...
        }
    });

If not RequestParams, how to bind image to request BODY by PUT?

@leonardoxh
Copy link

Maybe generate a base64 image and attach to body (I not recommend this)...

Why not set this header?

But web requests with data will be a multipart/form-data in any language.

@kamoljan
Copy link
Author

I already implemented multipart/form-data handling from server side, so it is not an issue already.
Just wondering, if android-async-http provides like kind of PUT request without multipart/form-data?

@leonardoxh
Copy link

On the client this feature will probably not supported.

@smarek smarek added this to the 1.4.6 milestone Mar 24, 2014
@smarek smarek self-assigned this Mar 24, 2014
@smarek
Copy link
Member

smarek commented Mar 24, 2014

@kamoljan how you'd like to put/post the file without multi-part/form-data ?

@gongzunpan
Copy link

印象笔记无法提交笔记,原因如下:

本月帐户上传流量已经达到上限。

原消息详情:
来自:Marek Sebera <notifications@github.com>
发送到:gongzunpan.e099425@m.yinxiang.com
全部收件人:loopj/android-async-http <android-async-http@noreply.github.com>
主题:Re: [android-async-http] How to send PUT request without multipart/form-data? (#464)

为了防止邮件过多,接下来的360分钟内,你将不会收到报错回复。

升级到印象笔记高级帐户,可以发送的邮件数量将从50封提升到200封。
https://app.yinxiang.com/Checkout.action?origin=email%2Dcommerce

  • 印象笔记团队

@kamoljan
Copy link
Author

Hi, thank you for asking!

With put method and data in body of HTTP.

Thanks,
Kamol
On Mar 25, 2014 6:26 AM, "Marek Sebera" notifications@github.com wrote:

@kamoljan https://github.com/kamoljan how you'd like to put/post the
file without multi-part/form-data ?

Reply to this email directly or view it on GitHubhttps://github.com//issues/464#issuecomment-38509228
.

@fineswap fineswap reopened this Apr 29, 2014
@gongzunpan
Copy link

印象笔记无法提交笔记,原因如下:

本月帐户上传流量已经达到上限。

原消息详情:
来自:Noor Dawod <notifications@github.com>
发送到:gongzunpan.e099425@m.yinxiang.com
全部收件人:loopj/android-async-http <android-async-http@noreply.github.com>; zunpan <gongzunpan@gmail.com>
主题:Re: [android-async-http] How to send PUT request without multipart/form-data? (#464)

为了防止邮件过多,接下来的360分钟内,你将不会收到报错回复。

升级到印象笔记高级帐户,可以发送的邮件数量将从50封提升到200封。
https://app.yinxiang.com/Checkout.action?origin=email%2Dcommerce

  • 印象笔记团队

@smarek smarek removed the wontfix label Jun 10, 2014
@smarek smarek closed this as completed Jun 10, 2014
@gongzunpan
Copy link

印象笔记无法提交笔记,原因如下:

本月帐户上传流量已经达到上限。

原消息详情:
来自:Marek Sebera <notifications@github.com>
发送到:gongzunpan.e099425@m.yinxiang.com
全部收件人:loopj/android-async-http <android-async-http@noreply.github.com>; zunpan <gongzunpan@gmail.com>
主题:Re: [android-async-http] How to send PUT request without multipart/form-data? (#464)

为了防止邮件过多,接下来的360分钟内,你将不会收到报错回复。

升级到印象笔记高级帐户,可以发送的邮件数量将从50封提升到200封。
https://app.yinxiang.com/Checkout.action?origin=email%2Dcommerce

  • 印象笔记团队

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants