Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send [object object] from method PUT #54

Closed
nicholasess opened this issue Jun 19, 2018 · 4 comments
Closed

Send [object object] from method PUT #54

nicholasess opened this issue Jun 19, 2018 · 4 comments

Comments

@nicholasess
Copy link

Hi @fdaciuk, i`m try to send a object to endpoint, but the network in browser show [object object].

my code:

  let url = 'http://localhost:3000/api'
  let request = (param, data) = ajax({
    method: "put",
    url: url + param,
    data: data,
  }); 

  request(`/users/1`, { driverDocument: { status: 2 } }).then()

Network

captura de tela 2018-06-19 as 09 15 46

@fdaciuk
Copy link
Owner

fdaciuk commented Jun 19, 2018

Hey @nicholasess! It's definitely a bug :
The library is ready to accept an object with just one level.

I'll fix it =)

@nicholasess
Copy link
Author

Nice man, i always use the library, but i changed to axios in project to finish my job. When you fixed it, tell me about.

Thanks

@fdaciuk
Copy link
Owner

fdaciuk commented Sep 12, 2018

@nicholasess can you try it again with new version?

@fdaciuk
Copy link
Owner

fdaciuk commented Sep 12, 2018

I'll close this issue because the problem was already solved. But if you want any other trouble, just let me know =)

@fdaciuk fdaciuk closed this as completed Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants