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

please how to redirect new url in http module ? #439

Closed
runnerSnail opened this issue May 23, 2019 · 6 comments
Closed

please how to redirect new url in http module ? #439

runnerSnail opened this issue May 23, 2019 · 6 comments

Comments

@runnerSnail
Copy link

No description provided.

@runnerSnail runnerSnail changed the title please how to redirect new url? please how to redirect new url in http module ? May 23, 2019
@runnerSnail
Copy link
Author

sorry i know

@runnerSnail
Copy link
Author

          // .  req: ServerRequest
           req.headers = new Headers();
            req.headers.set('Cookie',`user_id=${userinfo.user_id};domain=127.0.0.1;max-age=2678400`);
            req.headers.set('Location','/');
            // req.headers.set("content-length", "5");
            req.respond({ body: new TextEncoder().encode(), status: 302 });

@runnerSnail runnerSnail reopened this May 24, 2019
@runnerSnail
Copy link
Author

it dont work,sad~

@runnerSnail
Copy link
Author

i know

@ry
Copy link
Member

ry commented May 24, 2019

Can you explain what happened, in case someone else has the problem?

@runnerSnail
Copy link
Author

// I want to redirect the url, so I should do [right]
let headers = new Headers();
headers.set('Location','/home');
req.respond({ body: new TextEncoder().encode(),status: 302,headers });


// error do

req.headers = new Headers();
req.headers.set('Set-Cookie','user_id=1234;max-age=2678400');
req.headers.set('Location','/home');
req.respond({ status: 302 });

inverted-capital pushed a commit to dreamcatcher-tech/napps that referenced this issue Oct 24, 2024
This change adds the following REST API endpoints.
- `GET /api/users`
- `GET /api/users/[login]`
- `GET /api/users/[login]/items`

Documentation will come in a follow-up PR.

Towards denoland#439
inverted-capital pushed a commit to dreamcatcher-tech/napps that referenced this issue Oct 24, 2024
This change adds the following REST API endpoints:
- `GET /api/items`
- `GET /api/items/[id]`
- `GET /api/items/[id]/comments`

Documentation will come in a follow-up PR.

Prerequisite for denoland#438 or denoland#429
Towards denoland#439
inverted-capital pushed a commit to dreamcatcher-tech/napps that referenced this issue Oct 24, 2024
…d#442)

This change adds the `GET /api/users/[login]/notifications` REST API
endpoint.

Documentation will come in a follow-up PR.

Towards denoland#439 and denoland#414
inverted-capital pushed a commit to dreamcatcher-tech/napps that referenced this issue Oct 24, 2024
This change contains a few changes that affect interdependent features.
Changes include:
- Add `<ItemsList />` with cursor-based pagination
- Remove now unused code for the previous pagination solution
- Fix and rework voting functionality relating to denoland#427
- Tweak REST API endpoints return signature to be more generic, using a
`values` field
- `fetchValues()`
- Simplify and optimise `<VoteButton />`
- New `DELETE/GET /api/items/[id]/vote` endpoint
- New `GET /api/me/votes` endpoint
- Other various cleanups

Note: The migration script has been tested successfully locally.

Closes denoland#427
Closes denoland#414
Towards denoland#439
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants