Subversion Repositories SmartDukaan

Rev

Rev 35623 | Rev 36295 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35623 Rev 36200
Line 363... Line 363...
363
        }
363
        }
364
        request.setEntity(requestEntity);
364
        request.setEntity(requestEntity);
365
        return this.executeJson(request);
365
        return this.executeJson(request);
366
    }
366
    }
367
 
367
 
-
 
368
    public MandiiResponse postWithResponse(String url, String body, Map<String, String> headers)
-
 
369
            throws ProfitMandiBusinessException, HttpHostConnectException {
-
 
370
        HttpPost request = new HttpPost(url);
-
 
371
        for (Map.Entry<String, String> entry : headers.entrySet()) {
-
 
372
            request.setHeader(entry.getKey(), entry.getValue());
-
 
373
        }
-
 
374
        try {
-
 
375
            request.setEntity(new StringEntity(body));
-
 
376
        } catch (UnsupportedEncodingException unsupportedEncodingException) {
-
 
377
            LOGGER.error("Encoding error : ", unsupportedEncodingException);
-
 
378
            throw new RuntimeException(ResponseCodeHolder.getMessage("GE_1006"));
-
 
379
        }
-
 
380
        return this.executeMandii(request);
-
 
381
    }
-
 
382
 
368
    public String patchJson(String url, Object object, Map<String, String> headers)
383
    public String patchJson(String url, Object object, Map<String, String> headers)
369
            throws ProfitMandiBusinessException, HttpHostConnectException {
384
            throws ProfitMandiBusinessException, HttpHostConnectException {
370
        String jsonString;
385
        String jsonString;
371
        try {
386
        try {
372
            if (object.getClass().equals(String.class)) {
387
            if (object.getClass().equals(String.class)) {