All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.buyexpressly.api.resource.server.XlyQuery Maven / Gradle / Ivy

Go to download

Expressly Java SDK to integrate e-commerce platforms with the Expressly Network API

There is a newer version: 2.3.1
Show newest version
package com.buyexpressly.api.resource.server;

import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class XlyQuery extends StringEntity {

    public XlyQuery(String string) throws UnsupportedEncodingException {
        super(string, ContentType.APPLICATION_JSON);
    }

    public static   XlyQuery toJsonEntity(T request) throws IOException {
        String json = new ObjectMapper().writer().writeValueAsString(request);
        return new XlyQuery(json);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy