Ricki Ricardo
Posts: 0
Joined: Fri Nov 16, 2012 9:30 am

Post request

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Post request

Hello!

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

Ricki Ricardo
Posts: 0
Joined: Fri Nov 16, 2012 9:30 am

Post request

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

Ricki Ricardo
Posts: 0
Joined: Fri Nov 16, 2012 9:30 am

Post request

May be this is help to understanding. Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Post request

Thank you. Working on it. I'll update

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Post request

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).

Ricki Ricardo
Posts: 0
Joined: Fri Nov 16, 2012 9:30 am

Post request

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Post request

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Post request

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.

Ricki Ricardo
Posts: 0
Joined: Fri Nov 16, 2012 9:30 am

Post request

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.

Return to “Issues”