Sign Up

Log In


By apicloud
Updated 4 months ago
Popularity Score
Success Rate
ashishspanicker4 years ago
NoSuchFieldErrorHi I am trying to use the face rect api from my java appliaction. I have added the necessary jars and executed the application. Nu I am getting the following error. Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT at at com.mashape.unirest.http.options.Options.refresh( at com.mashape.unirest.http.options.Options.<clinit>( at com.mashape.unirest.http.HttpClientHelper.prepareRequest( at com.mashape.unirest.http.HttpClientHelper.request( at com.mashape.unirest.request.BaseRequest.asJson( at Main.main( Java Result: 1 This is the java code which I executed. public class Main { public static void main(String[] args) throws UnirestException, JSONException { HttpResponse<JsonNode> request ="") .header("X-Mashape-Authorization", "YfG4JGGx1u5tsXE75EzzADm7DKfKZler") .field("image", new File("d:\\f.jpg")) .field("features", "false") .asJson(); } }
apicloud4 years ago
Hi there! Your code seems correct and it works for me. I suppose you have an issue with external JARs. Please make sure you downloaded and added all the following JARs with exact same versions: 1. 2. 3. ALL JARs from the lib folder: 4. ALL JARs from the lib folder: After adding all the JARs your code should work. Hope that helps! Andy
ashishspanicker4 years ago
Hey Andy Thanks for the support. As you mentioned jar files was the issue. Now its working fine. Thanks Ashish
Hi Developer, feel free to post your answer:
Log inSign up

Install SDK for NodeJS


To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request"")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard