Topic
  • No replies
SystemAdmin
SystemAdmin
24948 Posts

Pinned topic Post attachment using OSLC 1.0 CM REST API failed

‏2013-03-13T14:32:08Z |
Hi,

I try to post a new attachment to defects using OSLC 1.0 CM REST API, but received the http 301 error:

HttpMethodDirector : Redirect requested but followRedirects is disabled.

My post url is "http://cq.xxx.net/cqweb/oslc/repo/xxx/db/xxx/record/16777244-34155853/field/attachments/attachment", and I've set the following request headers:

post.setRequestHeader("OSLC-Core-Version", "1.0");
post.setRequestHeader("Content-type", "multipart");

So what's wrong with me?

Thanks a lot for help!