Page 1 of 4

Post request

Posted: Tue Feb 26, 2013 3:59 pm
by Ricki Ricardo

Hello. I have a problem. I should make post request to api. My post request should have specific headers. I tried make this using tiggzi rest and use js and all the time I have same resut
POST http://project.tiggzi.com/rest/tunnel 405 (Method Not Allowed)
When I use extention for chrome (advanced rest client) I have next result
200 OK.

This is my request in tiggzi

settings = {
data : {
"sourceType": "Device",
"deviceName": "Withings WBS01 Body Scale",
"originAppName": "Health Vault",
"measurementType": "Weight",
"numericValue": 74,
"valueUnit": "kg",
"date": "2012-07-01",
"time": "2012-07-04T15:23:42-0400",
"notes": "Lost 2 pounds this week!"
},
headers : {
"tiggzi-proxy-url": "https://api.carepass.com/user-directo...",
"Authorization": "Bearer " + access_token,
"Content-Type": "application/json",
"Accept": "application/json"
}
};

testRST.execute(settings);

Could you help me?
Thank you in advance.


Post request

Posted: Tue Feb 26, 2013 6:32 pm
by Kateryna Grynko

Hello!

What Requestst/Response parameters does "testRST" REST Service has ? Are any of them redefined in REST Service parameters?


Post request

Posted: Wed Feb 27, 2013 8:13 am
by Ricki Ricardo

Hello. It's an empty rest service. I have same result if I use full rest request.


Post request

Posted: Wed Feb 27, 2013 9:59 am
by Ricki Ricardo

May be this is help to understanding. Image


Post request

Posted: Wed Feb 27, 2013 10:09 am
by Maryna Brodina

Thank you. Working on it. I'll update


Post request

Posted: Wed Feb 27, 2013 1:31 pm
by Maryna Brodina

405 (Method Not Allowed) probably means that you send data in incorrect format or you didn't send required data. Please check it Chrome Developer tools (Response tad).


Post request

Posted: Thu Feb 28, 2013 10:05 am
by Ricki Ricardo

Hello. Today I have following results.
When I do test request I have a good results. But when I try reproduce result using invoke rest I recieve next error - 400 ({"message":"The request cannot be fulfilled because it is syntactically invalid."}).
Image


Post request

Posted: Thu Feb 28, 2013 3:00 pm
by Maryna Brodina

Hello! Sorry for delay. We're working on it.


Post request

Posted: Thu Feb 28, 2013 9:56 pm
by Kateryna Grynko

Hello!

Seems you forgot to add Apikey parameter to request via Tiggzi tunnel. When POST requesting, Header parameter "Apikey" should be sent to server. I can't see this parameter on screen shot.


Post request

Posted: Fri Mar 01, 2013 8:58 am
by Ricki Ricardo

Hello.

"Apikey" doesn't need for app. It works on test, but doesn't work when I invoke serivice all time I have this error "{"message":"The request cannot be fulfilled because it is syntactically invalid."}". I cant share to you my project.