0

I'm using POeditor.com in order to manage the languages of an application I'm developping.

POEDitor.com gives the possibility to use an API to access some information about the project you have there.

This API needs to be called through a POST with next data:

URL: - https://poeditor.com/api/

ARGUMENTS: - api_token (Required) - action = list_languages (Required) - id - the id of project (Required)

What I'm trying to do is to call this API through a jQuery POST query. Here is the code I have done:

$(function() {
    $.post(
        "https://poeditor.com/api/",
        {
            "api_token" : "ecxxxx28",
            "action"    : "list_languages",
            "id"        : "1xxx8"
        },
        function(data) {
                alert(data);
        },
        "json"
    );  
});

Using Firebug, I can see the query is sent but no answer is sent back by the API. Note that I should receive a response in JSON format.

I don't see what I'm doing wrong. Does any one could give an example or a tip?

1 Answer 1

1

This would be possible if the server accepts cross domain posts. Otherwise you will get an error like this in browser:

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Your post is sent but no response is sent back.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.