JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
135 stars 105 forks source link

YouTrack REST API which requires 'PUT' commands don't work due to apparent limitation in EasyHttp #9

Closed codekaizen closed 11 years ago

codekaizen commented 12 years ago

EasyHttp doesn't provide working support for PUT requests, since it fails to set the needed ContentLength. Using System.Net.HttpWebRequest as a workaround works.

tdietrich513 commented 11 years ago

I am also seeing this issue. Tried to add support for creating new version in the bundles, but it requires a PUT command and that makes it fail.

hhariri commented 11 years ago

Can you give me some code with this failing? I'll look into it. Or alternatively just send me a pull request for EasyHttp and I'll update it all.

codekaizen commented 11 years ago

If I recall, and understand the issue is the same, the problem is the EasyHttp didn't support PUT, which the patch I submitted adds.

On Thu, Jan 10, 2013 at 12:45 PM, Hadi Hariri notifications@github.comwrote:

Can you give me some code with this failing? I'll look into it.

— Reply to this email directly or view it on GitHubhttps://github.com/JetBrains/YouTrackSharp/issues/9#issuecomment-12117703.

hhariri commented 11 years ago

Can you re-submit? Sorry, I'm not sure what happened with this :( Patch for EasyHttp I mean...

tdietrich513 commented 11 years ago

I tried to hack support for content-length on put requests with null data, but I'm a little out of my comfort zone with this one.

There is a project management method to create a subsystem. If you create a spec to execute it, you should get a failure.

I am also wondering what the story is with the sandbox project on the YouTrack site. I've got a spec that creates a version in the version bundle, but I don't know if it's going to get cleared out or rolled back or whatever- do I have to clean up after myself with a test?

tdietrich513 commented 11 years ago

Any help here?

hhariri commented 11 years ago

Tom, sorry, I've been swamped. I've got this on my list to look at. Let me see if I can get to it by this weekend.

tdietrich513 commented 11 years ago

No problem at all. I can fork and push my version creation code up for merging once the put issue is fixed.

tdietrich513 commented 11 years ago

Here is my commit with the version bundle stuff. Obviously I'd like to write some specs to make sure this works properly, so as soon as you get the put stuff fixed I'll test it out and issue a pull request.

https://github.com/tdietrich513/YouTrackSharp/commit/7320fb66b7465533edbe2903e4880627aca82819

codekaizen commented 11 years ago

Hey all -

sorry this got buried. Here's my fork: https://github.com/codekaizen/YouTrackSharp

It has the Version Bundle work and I think also the EasyHttp updates.

On Thu, Jan 24, 2013 at 5:48 AM, Tom Dietrich notifications@github.comwrote:

Here is my commit with the version bundle stuff. Obviously I'd like to write some specs to make sure this works properly, so as soon as you get the put stuff fixed I'll test it out and issue a pull request.

tdietrich513@7320fb6https://github.com/tdietrich513/YouTrackSharp/commit/7320fb66b7465533edbe2903e4880627aca82819

— Reply to this email directly or view it on GitHubhttps://github.com/JetBrains/YouTrackSharp/issues/9#issuecomment-12651598.

hhariri commented 11 years ago

Guys, I've just checked in a version of EasyHttp that adds the content-length header when body is present.

hhariri commented 11 years ago

Please hold on this as I've not yet updated EasyHttp. There's an issue with Multipart I want to fix first.