Coder Social home page Coder Social logo

cplusplus-api's Issues

HTTP error #403 with simplest test

Hi All,
I am trying to run a simplest test of C++ API like this:

SG::Dict auth;
auth.add("script_name", "ClientApi").add("script_key", "<undisclosed>");
SG::Dict findMap;
findMap.add("filters", SG::Dict("logical_operator", "and")
                           .add("conditions", SG::List()));
findMap.add("return_only", "retired");
SG::Dict paging("current_page", 1);
paging.add("entities_per_page", 1);
findMap.add("paging", paging);

xmlrpc_c::paramList params;
params.add(toXmlrpcValue(auth));
params.add(toXmlrpcValue(findMap));

std::clog<<"param size "<<params.size()<<"\n";
for(int i = 0; i < params.size(); i++)
    std::clog<<" param["<<i<<"] = '"<<params.getStruct(i)<<"'\n";

cout<<"rpc test\n";
xmlrpc_c::clientXmlTransport_wininet transport;
xmlrpc_c::client_xml client = xmlrpc_c::client_xml(&transport);
xmlrpc_c::carriageParm_wininet0 myCarriageParm("http://<undisclosed>");
xmlrpc_c::rpcPtr myRpcP("read", params);
cout<<"rpc call\n";
try {   
myRpcP->call(&client, &myCarriageParm);
  } catch (exception const& e) {
      cerr << "Client threw error: " << e.what() << endl;
} catch (...) {
cerr << "Client threw unexpected error." << endl;
}    

RPC->call() always encounter error

Client threw error: Unable to transport XML to server and get XML response back. HTTP error #403 occurred.

I am sure there is a Shotgun site up-and-running, and there is no issue access server via Python API. So what could go wrong?

zhang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.