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

java.net.ProtocolException: DELETE does not support writing #180

Closed
varis opened this issue Apr 22, 2015 · 0 comments
Closed

java.net.ProtocolException: DELETE does not support writing #180

varis opened this issue Apr 22, 2015 · 0 comments

Comments

@varis
Copy link

varis commented Apr 22, 2015

run example from http://github-api.kohsuke.org/

GitHub github = GitHub.connect();
GHRepository repo = github.createRepository(
  "new-repository","this is my new repository",
  "http://www.kohsuke.org/",true/*public*/);
repo.delete();

on android 4.4.4 API 19 and on delete got error

----- begin exception -----
04-21 23:58:06.992 1823-1836/? I/TestRunner﹕ java.net.ProtocolException: DELETE does not support writing
at com.android.okhttp.internal.http.HttpURLConnectionImpl.initHttpEngine(HttpURLConnectionImpl.java:258)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:86)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:254)
at org.kohsuke.github.Requester.buildRequest(Requester.java:299)
at org.kohsuke.github.Requester._to(Requester.java:221)
at org.kohsuke.github.Requester.to(Requester.java:191)
at org.kohsuke.github.Requester.to(Requester.java:179)
at org.kohsuke.github.GHRepository.delete(GHRepository.java:502)
at com.example.varis.githubtest.ApplicationTest.test(ApplicationTest.java:25)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:115)
at junit.framework.TestResult.runProtected(TestResult.java:133)
at junit.framework.TestResult.run(TestResult.java:118)
at junit.framework.TestCase.run(TestCase.java:124)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)

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

No branches or pull requests

2 participants