returning solver as a response from rest api

Hi

I'm implementing a rest api where I want a GET method to return a dwave.cloud.solver.Solver object to a client service wich is going to consume the Solver.

Is it possible? Because I'm receiving this by the moment: TypeError: Object of type Response is not JSON serializable

I have tried with jsonify from Flask, dump from Python.

 

0

Comments

2 comments
  • Hello,

    Unfortunately, this method of passing a solver via GET is not supported or advised.
    It is either not possible or at least not feasible for a number of reasons.
    The way the solver works is using a connection, which itself being passed via HTTP request does not seem feasible.

    You might want to have the end user pass in a problem and get back a solution.
    What do you think about this option?

    0
    Comment actions Permalink
  • Of course, you are right. Now I'm working in other option. 

    Thanks so much.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post