Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 18 14:50

    ryber on main

    put the mime types in alphabeti… (compare)

  • Nov 18 14:37

    ryber on main

    update docs add a common reference to popul… (compare)

  • Nov 18 14:00

    ryber on main

    add a convience method for sett… (compare)

  • Nov 09 16:44
    Hakky54 commented #384
  • Nov 09 16:44
    Hakky54 commented #384
  • Nov 09 15:28
    ryber opened #385
  • Nov 09 15:27

    ryber on main

    update spark-core ignore CVE-2020-27216 in test d… (compare)

  • Nov 09 13:22

    ryber on main

    Removed redundant access modifi… Merge pull request #384 from Ha… (compare)

  • Nov 09 13:22
    ryber closed #384
  • Nov 09 13:07
    Hakky54 edited #384
  • Nov 09 13:07
    Hakky54 opened #384
  • Nov 09 01:37
    ryber milestoned #383
  • Nov 09 01:37
    ryber demilestoned #383
  • Nov 09 01:22

    ryber on main

    updated changeglog (compare)

  • Nov 09 01:19
    ryber commented #383
  • Nov 09 01:16

    ryber on main

    [maven-release-plugin] prepare … (compare)

  • Nov 09 01:16

    ryber on v3.11.05

    (compare)

  • Nov 09 01:16

    ryber on main

    update version in doc put the dots back [maven-release-plugin] prepare … (compare)

  • Nov 08 23:13
    ryber commented #383
  • Nov 08 23:10
    reini2150 commented #383
Jan Haesen
@janhaesen
Do you perhaps have a full stacktrace or some way for me to reproduce/test it? Then I can have a closer look. @GrBojan
Vatslau
@VatslauX
Hi I have a problem
.asJson
server failed (return html and server error)
leads exception
How to try .asJson
and if failed
try .asString - ?
Sachs
@sachsgit
Greetings, I wish to use Unirest for Java within our development, but our Security wishes to know what standards are used to develop it. Does anyone know where I can find such documentation or such?
Jan Haesen
@janhaesen
@VatslauX you could attempt it by doing a try catch finally construction. In the catch you could attempt it in another format. It is kinda odd though. Perhaps you can use the raw body instead and transform that to something you can interpret.
vikash52
@vikash52
Hello all, as per document I have to shutdown the Unirest Event Loop by calling Unirest.shutdown(). What is the best way to Shutdown Unirest event? After every successful call or when the application is shutting down?
Matthias Müller
@MattDiMu
Hi, does anybody know more about the current status of the Unirest-Project? It seems to be a bit uncared recently. Is there any major active fork where development continues and where my Pull Requests have a realistic chance to be integrated?
B D Merin babu
@dmerin7_twitter
Hi need help in resolving a REST Code using UniRest
??
please
kapildas
@pkapildas
Is Unirest-java supports http2?
Vatslau
@VatslauX
@janhaesen Thanks, it works. But i moved already to Retrofit and RX Java
Alcuin-van-Zijl
@Alcuin-van-Zijl
Just to inform: I just posted an issue. As this is about a memory leak I thought to give a heads-up.
Jan Haesen
@janhaesen
@MattDiMu Overall I don't think this project is active anymore. I've started my own rest client that is largely based on Unirest. Also judging by the last commits (2 years or so ago) this library can be considered deprecated/abandoned.
mani
@neomatrix369
Hi looking for examples for requestContext.getUriInfo().getQueryParameters() anyone can redirect me to some? Thanks
Ryan Bergman
@ryber
If anyone is interested I've forked this project into a community driven one. I'm working on getting deployed to Maven central and I will take issues and pull requests https://github.com/OpenUnirest/unirest-java
suheping
@suheping
@Gursewak1990_twitter you should implements runnable,setConcurrency just a setting
LeonoraC
@LeonoraC
hello! does anyone know how to add maven in android studio?
Kiran
@5KGreat_twitter
Hi
what if I dont use this: Unirest.setProxy(new HttpHost("127.0.0.1", 8000));
it is not able to make connection
pls help
xushunke
@xushunke
can i use Unirest(java) by new a instance instead of Class static method,I do not want other developers sharing the same classLoader with me have access 2 change my Unirest config
LowTix
@LowTix
When I use Unirest, the error "Caused by: java.lang.ClassNotFoundException: org.apache.http.client.methods.HttpUriRequest" appears that has a solution?
LowTix
@LowTix
I have already looked, but nothing tells me how to solve my problem
Ryan Bergman
@ryber
@LowTix Unirest has a dependency on Apache Http Client. If you are using maven or gradle this should be resolved for you. However it's also possible you could have a another dependency on a older version of that library coming from something else, so you should check your dependency tree. If you are NOT using a dependency management tool you will need to make sure the most recent version of that library is on the classpath. Note that the version of HttpClient that Kong/unirest-java depends on has several security bugs and so should not be used.
Espen Haviken
@nitelite
Is there a trick to getting Unirest Java to use multipart/form-data when sending fields (without any files) in a POST request? Default behavior seems to be to use application/x-www-form-urlencoded ?
Espen Haviken
@nitelite
Looks like i managed to trick it by using a bytearrayinputstream, and do a getBytes on my string into that inputstream, and then set the inputstream as part of the fields, making unirest think there is a file attached :P
Arpit Agrawal
@arpit728
Can anyone please review this pull request
David Boyer
@mangr3n
Is the javadoc available online somewhere?
Bastian Kuberek
@bkuberek
@arpit728, as suggested by @ryber and @phenom1711, kong/unirest-java seems to be unmaintained. You might want to be using https://github.com/OpenUnirest/unirest-java
Bastian Kuberek
@bkuberek
@ryber why should I invest into OpenUniRest when OkHttp is growing faster and seems to have better traction and community?
Kent Avasarala
@kent92
Hello, Im trying to make http get/post requets using Unirest.
I used this line in the dependencies in my build.gradle:
implementation 'com.mashape.unirest:unirest-java:1.4.9'
and when i launch the main class using 'gradle run', things work fine and i don't get any errors
but when i build a jar using 'gradle jar', and then try to run the jar using 'java -jar myapp.jar', i get:
$ java -jar java-http-req.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/mashape/unirest/http/exceptions/UnirestException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.mashape.unirest.http.exceptions.UnirestException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Kent Avasarala
@kent92
nvm, found my answer
in the gradle build script, make sure your 'jar' tasks look like this:

jar {
manifest {
attributes 'Main-Class': 'com.javatesting.req.App'
}

from {
    configurations.compile.collect {
        it.isDirectory() ? it : zipTree(it)
    }
}

}

Laxman-M-R
@Laxman-M-R
Hi!
Does anyone know how to use unirest in dropwizard? I am new to both. So help is required. Thanks in advance!
kingdevnl
@kingdevnl
Hey
Is it possible to add a json body to an get request?
Ryan Bergman
@ryber
@kingdevnl No, this isn't something normally done (see this SO for the philosophical why https://stackoverflow.com/questions/978061/http-get-with-request-body) for the concrete why ... Unirest is powered by Apache Http Client, and that library also, does not allow for it.
Exerosis
@Exerosis
OMG :O unirest is back?
Onilton Maciel
@onilton
@ryber I started trying to update unirest.io/java since it is very outdated and seems to point people to an outdated unirest-java version. Any tips or idea to who to talk to?
I was also thinking about a script to automatically convert from the REAME.md to html