[Apiman-user] Mapping between REST services (GET/POST/PT/DELETE) & API Gateway
Charles Moulliard
cmoulliard at redhat.com
Wed Jul 8 13:44:47 EDT 2015
Hi,
The API Manager allows to map the proxy service (= service to be
authorized) with the real service exposed by example by a REST Endpoint
If the REST service exposes GET, PUT, DELETE & POST methods that we ca
nreach using these curl requests :
1) GET
curl http://localhost:8080/cxf/rest/customerservice/customers/123
2) POST
curl -i -H "Content-Type: application/json" -X POST -d
'{"Customer":{"name":"Charles"}}'
http://localhost:8080/cxf/rest/customerservice/customers
3) PUT
curl -i -H "Content-Type: application/json" -X PUT -d
'{"Customer":{"id":124,"name":"TUG"}}'
http://localhost:8080/cxf/rest/customerservice/customers
4) Delete
curl -X DEL
http://localhost:8080/cxf/rest/customerservice/customers/124
I have encoded this service API :
http://localhost:9090/rest/customerservice/customers/ but when I try to
reach it using the proxy API ("curl -v -k -H "Authorization: Bearer
$TOKEN"
https://127.0.0.1:8443/apiman-gateway/Newcastle/CustomerService/"), I
get this response : Server returned HTTP response code: 405 for URL:
http://localhost:9090/rest/customerservice/customers
QUESTION : Do I have to encode each service individually or can I encode
them one time when I declare the API Endpoint of the "Service
Implementation" ?
Regards,
--
Charles Moulliard
Principal Solution Architect / JBoss Fuse Expert - Global Enablement @redhat
cmoulliard at redhat.com | work: +31 205 65 12 84 | mobile: +32 473 604 014
MC-Square Business "Stockholm", Leonardo Da Vincilaan 19, Diegem 1831 -
Belgium
twitter: @cmoulliard <http://twitter.com/cmoulliard> | blog:
cmoulliard.github.io <http://cmoulliard.github.io>
committer: apache camel, karaf, servicemix, hawtio, fabric8, drools,
jbpm, deltaspike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20150708/4a0f65b6/attachment-0001.html
More information about the Apiman-user
mailing list