Test Your Proxy with postman

Hi

I am doing the "Lab:Test Your Proxy"

when I perform the test, HTTP response received from firebase

the proxy just send me the response back !

the database url such as , do not require authentication and work fine (you can test it)

https://apigee-developer-trainin-d0b0b.firebaseio.com/db/products/697690.json

however when doing this using the proxy the following url send to the target

https://apigee-developer-trainin-d0b0b.firebaseio.com/db/products/697690

and I receive HTTP response (the firebase login page html will return)

at least the proxy is working ! but the target API return wrong answer .. any ideas ?

0 6 1,443
6 REPLIES 6

sidd-harth
Participant V

You need to provide deatils of your proxy. How you defined it?

It helps us to provide answers.

Hello , thanks

this is the Proxy End Point

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ProxyEndpoint name="default">

<Description/>

<FaultRules/>

<PreFlow name="PreFlow">

<Request/>

<Response/>

</PreFlow> <PostFlow name="PostFlow">

<Request/>

<Response/>

</PostFlow>

<Flows>

<Flow name="Get All Products">

<Description>Get All Product Details</Description>

<Request/>

<Response/>

<Condition>(proxy.pathsuffix MatchesPath "/products") and (request.verb = "GET")</Condition>

</Flow>

<Flow name="Get Product">

<Description>Product Detail</Description>

<Request/>

<Response/>

<Condition>(proxy.pathsuffix MatchesPath "/products/*") and (request.verb = "GET")</Condition>

</Flow>

</Flows>

<HTTPProxyConnection>

<BasePath>/v1</BasePath>

<Properties/>

<VirtualHost>default</VirtualHost>

<VirtualHost>secure</VirtualHost>

</HTTPProxyConnection>

<RouteRule name="default">

<TargetEndpoint>default</TargetEndpoint>

</RouteRule>

</ProxyEndpoint>

*using the tracer , the proxy end point receive the request and formulate target url

and then the reponse I recieve from the API is HTML code for the login screen !

this is the Target End Point as well

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<TargetEndpoint name="default">

<Description/>

<FaultRules/>

<PreFlow name="PreFlow">

<Request/>

<Response/>

</PreFlow>

<PostFlow name="PostFlow">

<Request/>

<Response/>

</PostFlow>

<Flows/>

<HTTPTargetConnection>

<Properties/>

<URL>https://apigee-developer-trainin-d0b0b.firebaseio.com/db</URL> </HTTPTargetConnection>

</TargetEndpoint>

the problem does not seem to be related to the ProxyEnd Point as I receive the request, and the target end point generate what it seem a correct API Call

however the trace shows the "response received from target server : 301 Moved permanently"

am I using deprecated version or something like that !

thanks again

davidmyburgh
Participant II

Here's another post about this section of the course, that might help: https://community.apigee.com/questions/57380/coursera-test-your-proxy-lab-postman-throws-errors.html

hello , thanks for that,

however, the issue resolved in the above linked I believe they are related to problem on the proxy end point ,

in my case . the trace tool shows successful receive for the call, and the proxy end point end by generating what it seem a correct api call for the target server, then the response return with 301 moved permanetly , and very long html for login screen or something like that

Regards

Generally it's not a good idea to use Apigee Edge for proxying user interfaces. a Login screen.... suggests it's not an API.